Morgan Stanley interview question

Using DFS/BFS implement flood fill