Morgan Stanley Interview Question

Using DFS/BFS implement flood fill