A network of n nodes labeled 1..n. times[i] = [u, v, w] means a signal sent from u reaches v after w time. A signal starts at node k. Return the time for all nodes to receive it, or -1 if some node never does.
Patterns: dijkstra, heap, graph. Difficulty: medium.