percolation problem using union
deque and randomize queue