class UnionFind

Defined in:

datastructure/union_find.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(n : Int, edges : Enumerable(Tuple(Int32, Int32))) #

[View source]
def self.new(n : Int) #

[View source]

Instance Method Detail

def count_components : Int32 #

[View source]
def groups #

[View source]
def root(x : Int) #

[View source]
def same?(x : Int, y : Int) #

[View source]
def size(x : Int) #

[View source]
def unite(x : Int, y : Int) #

[View source]