Code
The highlighted line runs next. The pill shows the live values in the running call.
Variables
The data structures the code is building
The network
The number under each node is when the signal reaches it
Nodes 1…n are joined by directed edges times[i] = [u, v, t] (signal takes t to go from u to v). A signal starts at node k. Return how long until every node has it, or -1 if some node never does.
The highlighted line runs next. The pill shows the live values in the running call.
The data structures the code is building
The number under each node is when the signal reaches it
V = n nodes, E = len(times). The highlighted row is the solution being traced.
Keyboard: ← → step, Space play or pause. Up to 7 nodes and 14 edges, times from 0 to 99, each (u, v) pair at most once.