Relevant Patterns
#Study these pattern guides before tackling the problems. Understanding the core concepts will help you solve them more efficiently.
Practice Problems
#Medium#743
Show 2 hints
- Run Dijkstra from source; answer is max dist or -1 if unreachable.
- Skip stale pops; store adjacency as (to, weight).
Medium#1631
Show 2 hints
- Treat edge weight as abs height diff; use Dijkstra or binary search + BFS.
- Grid neighbors 4‑dir; skip stale queue entries.
Show 2 hints
- Run multi‑source Dijkstra/Floyd–Warshall; count reachable within threshold.
- Tie‑break by city index descending.
Hard#778
Show 2 hints
- Dijkstra where cost is max(cell value along path).
- Alternatively binary search threshold + BFS.
Hard#882
Show 2 hints
- Dijkstra on expanded edges budget; count reached subdivided nodes using remaining moves.
- Careful accounting to avoid double counting.
Track Your Progress
Mark problems as complete as you solve them. Come back anytime to continue where you left off.