# Shortest Path DSA Problems

> 33 Shortest Path coding problems for placements and interviews, sorted easiest first, with hints and company tags. Free practice on InternHack.

Canonical: https://www.internhack.in/learn/dsa/shortest-path
Last updated: 2026-11-28

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](https://www.internhack.in/learn/dsa/problem/cheapest-flights-within-k-stops) (Medium)
2. [Digit Operations to Make Two Integers Equal](https://www.internhack.in/learn/dsa/problem/digit-operations-to-make-two-integers-equal) (Medium)
3. [Evaluate Division](https://www.internhack.in/learn/dsa/problem/evaluate-division) (Medium)
4. [Find a Safe Walk Through a Grid](https://www.internhack.in/learn/dsa/problem/find-a-safe-walk-through-a-grid) (Medium)
5. [Find Minimum Time to Reach Last Room I](https://www.internhack.in/learn/dsa/problem/find-minimum-time-to-reach-last-room-i) (Medium)
6. [Find Minimum Time to Reach Last Room II](https://www.internhack.in/learn/dsa/problem/find-minimum-time-to-reach-last-room-ii) (Medium)
7. [Find the City With the Smallest Number of Neighbors at a Threshold Distance](https://www.internhack.in/learn/dsa/problem/find-the-city-with-the-smallest-number-of-neighbors-at-a-threshold-distance) (Medium)
8. [Jump Game VIII](https://www.internhack.in/learn/dsa/problem/jump-game-viii) (Medium)
9. [Minimize the Maximum Edge Weight of Graph](https://www.internhack.in/learn/dsa/problem/minimize-the-maximum-edge-weight-of-graph) (Medium)
10. [Minimum Cost of a Path With Special Roads](https://www.internhack.in/learn/dsa/problem/minimum-cost-of-a-path-with-special-roads) (Medium)
11. [Minimum Cost Path with Edge Reversals](https://www.internhack.in/learn/dsa/problem/minimum-cost-path-with-edge-reversals) (Medium)
12. [Minimum Cost to Buy Apples](https://www.internhack.in/learn/dsa/problem/minimum-cost-to-buy-apples) (Medium)
13. [Minimum Cost to Convert String I](https://www.internhack.in/learn/dsa/problem/minimum-cost-to-convert-string-i) (Medium)
14. [Minimum Cost to Reach City With Discounts](https://www.internhack.in/learn/dsa/problem/minimum-cost-to-reach-city-with-discounts) (Medium)
15. [Minimum Path Cost in a Hidden Grid](https://www.internhack.in/learn/dsa/problem/minimum-path-cost-in-a-hidden-grid) (Medium)
16. [Network Delay Time](https://www.internhack.in/learn/dsa/problem/network-delay-time) (Medium)
17. [Number of Restricted Paths From First to Last Node](https://www.internhack.in/learn/dsa/problem/number-of-restricted-paths-from-first-to-last-node) (Medium)
18. [Number of Ways to Arrive at Destination](https://www.internhack.in/learn/dsa/problem/number-of-ways-to-arrive-at-destination) (Medium)
19. [Path with Maximum Probability](https://www.internhack.in/learn/dsa/problem/path-with-maximum-probability) (Medium)
20. [The Maze II](https://www.internhack.in/learn/dsa/problem/the-maze-ii) (Medium)
21. [Design Graph With Shortest Path Calculator](https://www.internhack.in/learn/dsa/problem/design-graph-with-shortest-path-calculator) (Hard)
22. [Find Edges in Shortest Paths](https://www.internhack.in/learn/dsa/problem/find-edges-in-shortest-paths) (Hard)
23. [Find Shortest Path with K Hops](https://www.internhack.in/learn/dsa/problem/find-shortest-path-with-k-hops) (Hard)
24. [Minimum Cost to Convert String II](https://www.internhack.in/learn/dsa/problem/minimum-cost-to-convert-string-ii) (Hard)
25. [Minimum Cost to Make at Least One Valid Path in a Grid](https://www.internhack.in/learn/dsa/problem/minimum-cost-to-make-at-least-one-valid-path-in-a-grid) (Hard)
26. [Minimum Obstacle Removal to Reach Corner](https://www.internhack.in/learn/dsa/problem/minimum-obstacle-removal-to-reach-corner) (Hard)
27. [Minimum Time to Visit a Cell In a Grid](https://www.internhack.in/learn/dsa/problem/minimum-time-to-visit-a-cell-in-a-grid) (Hard)
28. [Minimum Weighted Subgraph With the Required Paths](https://www.internhack.in/learn/dsa/problem/minimum-weighted-subgraph-with-the-required-paths) (Hard)
29. [Modify Graph Edge Weights](https://www.internhack.in/learn/dsa/problem/modify-graph-edge-weights) (Hard)
30. [Number of Possible Sets of Closing Branches](https://www.internhack.in/learn/dsa/problem/number-of-possible-sets-of-closing-branches) (Hard)
31. [Reachable Nodes In Subdivided Graph](https://www.internhack.in/learn/dsa/problem/reachable-nodes-in-subdivided-graph) (Hard)
32. [Second Minimum Time to Reach Destination](https://www.internhack.in/learn/dsa/problem/second-minimum-time-to-reach-destination) (Hard)
33. [The Maze III](https://www.internhack.in/learn/dsa/problem/the-maze-iii) (Hard)

## Companies that ask shortest path problems

- [Google](https://www.internhack.in/learn/dsa/companies/google): 23 of these problems
- [Amazon](https://www.internhack.in/learn/dsa/companies/amazon): 16 of these problems
- [Meta](https://www.internhack.in/learn/dsa/companies/meta): 11 of these problems
- [Microsoft](https://www.internhack.in/learn/dsa/companies/microsoft): 11 of these problems
- [Bloomberg](https://www.internhack.in/learn/dsa/companies/bloomberg): 10 of these problems
- [Uber](https://www.internhack.in/learn/dsa/companies/uber): 7 of these problems
- [Atlassian](https://www.internhack.in/learn/dsa/companies/atlassian): 4 of these problems
- [Tiktok](https://www.internhack.in/learn/dsa/companies/tiktok): 4 of these problems
- [Samsung](https://www.internhack.in/learn/dsa/companies/samsung): 3 of these problems
- [Goldman Sachs](https://www.internhack.in/learn/dsa/companies/goldman-sachs): 3 of these problems
- [Flipkart](https://www.internhack.in/learn/dsa/companies/flipkart): 3 of these problems
- [DE Shaw](https://www.internhack.in/learn/dsa/companies/de-shaw): 2 of these problems

## Before your interview

Most resumes are filtered by software before a recruiter reads them. [Check your resume ATS score free](https://www.internhack.in/ats-score/try), no signup needed.

## Other DSA topics

- [Array](https://www.internhack.in/learn/dsa/array) (1869)
- [String](https://www.internhack.in/learn/dsa/string) (775)
- [Hash Table](https://www.internhack.in/learn/dsa/hash-table) (708)
- [Math](https://www.internhack.in/learn/dsa/math) (564)
- [Dynamic Programming](https://www.internhack.in/learn/dsa/dynamic-programming) (557)
- [Sorting](https://www.internhack.in/learn/dsa/sorting) (464)
- [Greedy](https://www.internhack.in/learn/dsa/greedy) (407)
- [Depth-First Search](https://www.internhack.in/learn/dsa/depth-first-search) (314)
- [Binary Search](https://www.internhack.in/learn/dsa/binary-search) (298)
- [Matrix](https://www.internhack.in/learn/dsa/matrix) (246)
- [Breadth-First Search](https://www.internhack.in/learn/dsa/breadth-first-search) (245)
- [Bit Manipulation](https://www.internhack.in/learn/dsa/bit-manipulation) (238)
- [Tree](https://www.internhack.in/learn/dsa/tree) (235)
- [Two Pointers](https://www.internhack.in/learn/dsa/two-pointers) (217)
- [Prefix Sum](https://www.internhack.in/learn/dsa/prefix-sum) (204)
- [Database](https://www.internhack.in/learn/dsa/database) (197)
- [Heap (Priority Queue)](https://www.internhack.in/learn/dsa/heap-priority-queue) (196)
- [Simulation](https://www.internhack.in/learn/dsa/simulation) (177)
- [Counting](https://www.internhack.in/learn/dsa/counting) (174)
- [Binary Tree](https://www.internhack.in/learn/dsa/binary-tree) (169)

## Related

- [Home](https://www.internhack.in/)
- [Learn](https://www.internhack.in/learn)
- [DSA](https://www.internhack.in/learn/dsa)
