Shortest path coding challenges

Practise shortest path with 2 coding challenges, from easy to hard. Every challenge runs in your browser with instant tests, an AI review of your code and community solutions to compare.

Medium · 2

Skills you'll practise: A* searchDijkstra's algorithmHeuristicsLazy deletion
  • Python · C++ · C#
  • Automated tests
  • AI code review
  • Community solutions
226
Challenges
2
Solutions shared
3
Languages

All challenges

Search by topic, language, or difficulty.

2 challenges
Medium

Shortest Weighted Routes

Find the minimum total route cost from city 1 to each city.

You'll learn Dijkstra's algorithmLazy deletion
GraphsPriority-queuesShortest-path
No solutions yet
Medium

A* Search on a Weighted Grid

Find the cheapest path across a grid of terrain costs with A*, the search algorithm behind game and robot pathfinding.

You'll learn A* searchHeuristics
GraphsGridsShortest-pathai
No solutions yet