Solving Percolation Problem using Union Find Algorithms