Domanda di colloquio di Amazon

They are just some simple array problems.