Track 16 · Lesson 12 of 12
Choosing an approach: a delivery planner
Weigh readability, speed and memory when choosing an algorithm, use heapq for top-k and priority queues, and build a route and schedule planner milestone by milestone.
You will be able to
- Compare candidate solutions by correctness, clarity, time and memory, and pick one deliberately
- Use heapq for top-k queries and as a priority queue
- Find the fastest route in a weighted graph with Dijkstra's algorithm
- Combine parsing, graph search, greedy scheduling and heuristics into a small working planner
Included with a Formula Quest membership
It has 6 graded exercises with feedback, hints and solutions. Python Quest is included in Formula Quest memberships that cover Python; membership and billing are managed on Formula Quest.
View Formula Quest memberships
Tracks 1 and 2, the first lesson of every track, the playground and the dataset library are free.