← LessonsCREATOR PATH Β· 10–12πŸš€

Starship Fuel Router

LESSON 151
🎯 Today's missions
πŸš€πŸͺπŸ
SPACE COMMAND

Starship Fuel Router

Every space lane burns a different amount of fuel. Your ship has to reach the target station on the least fuel possible. Learn the planner that finds the cheapest route every time.

🧠 Before we start

Oasis Search Party counted stops to find the shortest way. Today the lanes have costs, and the route with fewer stops can burn far more fuel. A map with costs on its lanes is a weighted graph. The trick is to lock in the cheapest station first, then check whether its neighbors have a cheaper way. This planner is called Dijkstra's algorithm.

πŸ” Pick cheapestβ†’πŸ”’ Lock itβ†’πŸ”„ Check neighborsβ†’πŸ Target locked
Challenge 1 of 4Build the planner
1

Build the planner routine

The planner repeats the same four moves. Tap the cards in the order the planner does them.

THE FUEL PLANNER Β· REPEAT UNTIL THE TARGET IS LOCKED
1 Β· FIRST
2 Β· THEN
3 Β· THEN
4 Β· LAST

🌟 What you learned

Come back tomorrow for another advanced visual coding adventure! ✨