TuSimple Interview Question

Leetcode medium problems. With followups. All graph related.