Mutates the disjoint-set forest by creating a new singleton set containing the element value with a rank of 0, a parent pointer to itself, indicating that the element is the representative member of its own set and a corresponding unique id. Returns the disjoint-set forest itself.
Also, the corresponding TypeScript ambient declarations are included in the PR.
Description
The PR introduces the following new unary method:
DisjointSet#makeSet(value)
Mutates the disjoint-set forest by creating a new singleton set containing the element
value
with a rank of 0, a parent pointer to itself, indicating that the element is the representative member of its own set and a corresponding unique id. Returns the disjoint-set forest itself.Also, the corresponding TypeScript ambient declarations are included in the PR.