TuSimple Interview Question

One asked one easy classic leetcode problem.