Domanda di colloquio di Amazon

a programming question based on logistics