~/problems
Problems
Basics first, then the classics, then company-style assessments. Every problem has tests you run right here; multi-level ones unlock as you go. See the roadmap.
Interview roadmap
Weighted graphs
Dijkstra, union-find, spanning trees.
21 problems
Interview roadmap
Weighted graphs Dijkstra, union-find, spanning trees.
Dijkstra (weighted shortest paths) guide
- Basics: the order Dijkstra settles nodes basics py · c++ · java easy
- Walk to the nearest open pharmacy py · c++ · java easy
- Network Delay Time py · c++ · java easy
- Path with Minimum Effort py · c++ · java medium
- Cheapest Flights Within K Stops py · c++ · java medium
- Cheapest route with one half-price coupon py · c++ · java medium
- Shortest path with reconstruction medium
- Swim in Rising Water py · c++ · java hard
Union-Find guide
- Basics: count groups with find and union basics py · c++ · java easy
- Pooled lunch money easy
- Number of Provinces py · c++ · java easy
- Redundant Connection py · c++ · java medium
- Accounts Merge py · c++ · java medium
- Union-Find class with component count easy
- Pin board connectivity Pinterest py · c++ · java medium
- Minimum triggers to absorb all balls Uber py · c++ · java medium
- Graph Valid Tree py · c++ · java medium
Minimum spanning tree guide
- Basics: Prim's algorithm with a heap basics py · c++ · java easy
- Finish the irrigation network py · c++ · java easy
- Min Cost to Connect All Points py · c++ · java medium
- Cheapest repairs to reconnect every city py · c++ · java easy