Flood Fill Algorithm Geeksforgeeks Javascript