Flexport interview question

A problem to be solved by programming skills