A common task to which computers are put is to compute optimal routes through a transport network we or our data can travel.
A foundational technique is Dijkstra's Algorithm a.k.a. Uniform Cost Search! It traverses the network using a priority queue (I described these concepts recently, calling networks "graphs"), & upon visiting each node updates the weight of its neighbours which it found a shorter path to.
Once a we visit a node that's the shortest path! Once we visit the destination...
1/3