Shortest Path DSA Problems

33 shortest path problems for coding interviews and campus placements, with hints and company tags. Below are all 33: 0 easy, 20 medium and 13 hard. Practise them free on InternHack and track what you have solved.

Shortest Path problems, easiest first

  1. Cheapest Flights Within K Stops (Medium)
  2. Digit Operations to Make Two Integers Equal (Medium)
  3. Evaluate Division (Medium)
  4. Find a Safe Walk Through a Grid (Medium)
  5. Find Minimum Time to Reach Last Room I (Medium)
  6. Find Minimum Time to Reach Last Room II (Medium)
  7. Find the City With the Smallest Number of Neighbors at a Threshold Distance (Medium)
  8. Jump Game VIII (Medium)
  9. Minimize the Maximum Edge Weight of Graph (Medium)
  10. Minimum Cost of a Path With Special Roads (Medium)
  11. Minimum Cost Path with Edge Reversals (Medium)
  12. Minimum Cost to Buy Apples (Medium)
  13. Minimum Cost to Convert String I (Medium)
  14. Minimum Cost to Reach City With Discounts (Medium)
  15. Minimum Path Cost in a Hidden Grid (Medium)
  16. Network Delay Time (Medium)
  17. Number of Restricted Paths From First to Last Node (Medium)
  18. Number of Ways to Arrive at Destination (Medium)
  19. Path with Maximum Probability (Medium)
  20. The Maze II (Medium)
  21. Design Graph With Shortest Path Calculator (Hard)
  22. Find Edges in Shortest Paths (Hard)
  23. Find Shortest Path with K Hops (Hard)
  24. Minimum Cost to Convert String II (Hard)
  25. Minimum Cost to Make at Least One Valid Path in a Grid (Hard)
  26. Minimum Obstacle Removal to Reach Corner (Hard)
  27. Minimum Time to Visit a Cell In a Grid (Hard)
  28. Minimum Weighted Subgraph With the Required Paths (Hard)
  29. Modify Graph Edge Weights (Hard)
  30. Number of Possible Sets of Closing Branches (Hard)
  31. Reachable Nodes In Subdivided Graph (Hard)
  32. Second Minimum Time to Reach Destination (Hard)
  33. The Maze III (Hard)

Companies that ask shortest path problems

Before your interview

Most resumes are filtered by software before a recruiter reads them. Check your resume ATS score free, no signup needed.

Other DSA topics