Domanda di colloquio di Amazon

Data structures and algorithms based question