TuSimple Interview Question

Question about manipulating data structures