J.B. Hunt Transport Interview Question

What is wrong with this code?