Samarth Agarwal's submission of Sort the Leaves | CodeChef