Skip to content

Instantly share code, notes, and snippets.

@KaiSforza
Created August 13, 2012 03:16
Show Gist options
  • Save KaiSforza/3336648 to your computer and use it in GitHub Desktop.
Save KaiSforza/3336648 to your computer and use it in GitHub Desktop.
public Percolation(int N) {
count = N*N;
id = new int[N*N];
sz = new int[N*N];
for (int i = 0; i < N*N; i++) {
id[i] = i;
sz[i] = 1;
}
width = N;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment