Minimize Hops in Fiber Optic Network
Depiction of the ideal algorithm and an implementation using queues:
Applet