Skip to content

Instantly share code, notes, and snippets.

View geolffreym's full-sized avatar
🏠
Working from home

Geolffrey Mena geolffreym

🏠
Working from home
View GitHub Profile
@geolffreym
geolffreym / Percolation.java
Last active October 15, 2021 13:48
Quick-Find Percolation
package DynamicConnection.example;
import DynamicConnection.WeightedQuickUnion;
public class Percolation {
private enum States {
CLOSE,
OPEN
}
private final int N;
function db.oplog.values.hashes () {
local host
local dbAddr
host=${2:-${ORBIT_DB_HOST}}
dbAddr=$(rawurlencode "${1}")
_curl "${host}/db/${dbAddr}/oplog/values" | jsawk "'return this.hash'" -a "'return this.join(\" \")'"