klaudiosinani / dsforest

Disjoint-set forests for ES6
MIT License
16 stars 0 forks source link

Add new `DisjointSet#setSize(value)` class method (#3) #11

Closed klaudiosinani closed 5 years ago

klaudiosinani commented 5 years ago

Description

The PR introduces the following new unary method:

Returns the size of the disjoint set that the given element value is a member of. If the value is not part of any set, then 0 is returned.

Also, the corresponding TypeScript ambient declarations are included in the PR.