TuSimple Interview Question

First round a simple coding question