Domanda di colloquio di Amazon

Nothing was really that difficult. With basic algos and DS knowledge it is doable