Domanda di colloquio di Amazon

The most difficult part was the most efficient algorithm