Skip to content

Commit f6c204d

Browse files
committed
style: Apply Java code style guidelines
1 parent 6ecbd41 commit f6c204d

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/main/java/com/thealgorithms/graph/DisjointSet.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,13 @@ public class DisjointSet {
5959
* @throws IllegalArgumentException if size is negative
6060
*/
6161
public DisjointSet(int size) {
62-
if (size < 0) {
62+
if (size < 0)
6363
throw new IllegalArgumentException("Size must be non-negative");
64-
}
6564
this.size = size;
6665
this.numSets = size;
6766
parent = new int[size];
6867
rank = new int[size];
6968

70-
// Initialize each element as its own set
7169
for (int i = 0; i < size; i++) {
7270
parent[i] = i;
7371
rank[i] = 0;

0 commit comments

Comments
 (0)