TuSimple Interview Question

Pick out the most downvoted question on LC and code it up without looking at the sample test case.