unionfind
unionfind copied to clipboard
Speedup components method
Applying suggestion from #2
Can anyone verify correctness of this?
I believe component_mapping implementation should also be updated in the same way.