TuSimple Interview Question

graph traversal and running median