Mastering graph traversal by thinking backwards: How to find cells that flow to both oceans using BFS.
Apr 22, 2026