Skip to main content
added 156 characters in body
Source Link
user118482
user118482
  • Now the goal is to perform efficient percolates() queries (boolean method that checks whether system percolates or not), using the UnionFind algorithm (Brute-force solution will take quadratic time, which is not scalable for huge systems).

Additional materials that might be useful:

  • Now the goal is to perform efficient percolates() queries (boolean method that checks whether system percolates or not), using the UnionFind algorithm (Brute-force solution will take quadratic time, which is not scalable for huge systems).

  • Quick video for visualizing the entire process:
    https://www.youtube.com/watch?v=xUWuZjadbbQ

  • Now the goal is to perform efficient percolates() queries (boolean method that checks whether system percolates or not), using the UnionFind algorithm (Brute-force solution will take quadratic time, which is not scalable for huge systems).

Additional materials that might be useful:

Tweeted twitter.com/StackCodeReview/status/780117706125283328
added 167 characters in body
Source Link
user118482
user118482
  • In this problem I model a percolation system using an N-by-N grid of sites. Each site could be either open or blocked (all of them are blocked initially). To open the site, client should call open(row, col) method.
  • There is a notion of full site. "A full site is an open site that can be connected to an open site in the top row via a chain of neighboring (left, right, up, down) open sites [1]"
  • The system percolates, when there is a full site in the bottom row.
  • Now the goal is to perform efficient percolates() queries (boolean method that checks whether system percolates or not), using the UnionFind algorithm (Brute-force solution will take quadratic time, which is not scalable for huge systems).

    Now the goal is to perform efficient percolates() queries (boolean method that checks whether system percolates or not), using the UnionFind algorithm (Brute-force solution will take quadratic time, which is not scalable for huge systems).

  • Quick video for visualizing the entire process:
    https://www.youtube.com/watch?v=xUWuZjadbbQ

  • In this problem I model a percolation system using an N-by-N grid of sites. Each site could be either open or blocked (all of them are blocked initially).
  • There is a notion of full site. "A full site is an open site that can be connected to an open site in the top row via a chain of neighboring (left, right, up, down) open sites [1]"
  • The system percolates, when there is a full site in the bottom row.
  • Now the goal is to perform efficient percolates() queries (boolean method that checks whether system percolates or not), using the UnionFind algorithm (Brute-force solution will take quadratic time, which is not scalable for huge systems).
  • In this problem I model a percolation system using an N-by-N grid of sites. Each site could be either open or blocked (all of them are blocked initially). To open the site, client should call open(row, col) method.
  • There is a notion of full site. "A full site is an open site that can be connected to an open site in the top row via a chain of neighboring (left, right, up, down) open sites [1]"
  • The system percolates, when there is a full site in the bottom row.
  • Now the goal is to perform efficient percolates() queries (boolean method that checks whether system percolates or not), using the UnionFind algorithm (Brute-force solution will take quadratic time, which is not scalable for huge systems).

  • Quick video for visualizing the entire process:
    https://www.youtube.com/watch?v=xUWuZjadbbQ

Remove unnecessary markdown
Source Link
janos
  • 113.1k
  • 15
  • 154
  • 396
Loading
added 22 characters in body
Source Link
user118482
user118482
Loading
Source Link
user118482
user118482
Loading