mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-12-19 07:00:35 +08:00
Add Disjoint Set (#2684)
This commit is contained in:
11
DataStructures/DisjointSets/Node.java
Normal file
11
DataStructures/DisjointSets/Node.java
Normal 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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user