Skip to content

Instantly share code, notes, and snippets.

View adslaton's full-sized avatar

A.D. Slaton adslaton

View GitHub Profile
@adslaton
adslaton / quick-union-merge.js
Created April 25, 2020 18:55
quick-union-merge
const connections = new Map();
// create objects in the array
const uf = (n) => {
for (const x of Array(n).keys()) {
connections.set({ id: x, name: x}, x);
}
}
// root