GoFreight interview question

question for code and design