HardAdvanced GraphsNeetCode 150 · #96/150
Swim in Rising Water
- 1Learn the pattern
Weighted edges → Dijkstra; connectivity questions → Union-Find; DAG ordering → topological sort.
- 2Trace your version
Paste your solution into the workspace and watch every step execute.
Open workspace - 3