Skip to content

Instantly share code, notes, and snippets.

Navin Tamilchelvam navin89

Block or report user

Report or block navin89

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
navin89 /
Created Dec 22, 2016 — forked from jingz8804/
Weighted Quick Union Find algorithm (Union-by-Size/Union-by-Height)
public WeightedQuickUnionFind{
private int[] id;
private int[] sz;
private int[] height; // this is for union-by-height
private int count; // the number of connected components
private int[] maximum; // keep track of the maximum object in each connected component
public WeightedQuickUnionFind(int N){
id = new int[N];
sz = new int[N];
You can’t perform that action at this time.