417 Pacific Atlantic Water Flow
Techniques Used
Graph
DFS
Approach 1 (Brute-force, Slow)
We maintain a flag variable (an array of length 2), storing the flag variables for both oceans. ie if flag[0] == 1 && flag[1] == 1 means that a particular cell can flow the water into both o...
raahulsaxena.hashnode.dev4 min read