Back to Question

What is the Pacific Atlantic Water Flow problem and how do you solve it?

Question Explain

This problem asks to find cells from which water can flow to both Pacific and Atlantic oceans. It tests multi-source BFS/DFS.

Start Trying This Question Simulation