AllMediaDesk Interview Question

First round: Algorithms! Second round: Tech interview