Skip to content

Latest commit

 

History

History
24 lines (16 loc) · 1.48 KB

File metadata and controls

24 lines (16 loc) · 1.48 KB

Percolation Problem

This is a solution of percolation problem using disjoint sets data structure.

demo

The data structure used is Weighted quick union with size constraint.

It is based on the one of the assignments of Princeton University course on Coursera. It has a dependency algs4.jar

I've written only Percolation.java , PercolationStats.java and StatsTest.java

Other files come from Princeton University Course. They are visualizer classes

InteractivePercolationVisualizer.java Creates a clickable grid where sites can be opened by mouse clicks. If the system percolates after a mouse click, the window shows the percolates message in the bottom of the window.

PercolationVisualizer.java creates a special percolation grid configuration based on the input file passed to it which contains cell co-ordinates to be opened in the NxN grid.