← Search
Search Target: 10s
Priority queues power Dijkstra's algorithm and task scheduling problems.
import heapq heapq.heappush(h, (priority, item)) _, item = heapq.heappop(h)
Type it from memory. Go.