Add Disjoint Set (#2684)

This commit is contained in:
NimrodRak
2021-10-24 10:28:21 +03:00
committed by GitHub
parent 4a05e3ecdb
commit b608657e50
2 changed files with 43 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
package DataStructures.DisjointSets;
public class Node<T> {
public int rank;
public Node<T> parent;
public T data;
public Node(T data) {
this.data = data;
parent = this;
}
}