ForestDisjointSet

A DisjointSet implementation backed by a disjoint-set forest, as described in chapter 21.3 of the third edition of CLRS. It uses path compression and union by rank.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
open override val elements: Int
Link copied to clipboard
open override var partitions: Int

Functions

Link copied to clipboard
open override fun add(x: T): DisjointSet.Partition<T>
Link copied to clipboard
Link copied to clipboard
open operator override fun get(x: T): DisjointSet.Partition<T>?
Link copied to clipboard
open operator override fun iterator(): Iterator<DisjointSet.Partition<T>>
Link copied to clipboard
Link copied to clipboard