Dinesh Goyal's submission of Sorting Segments | CodeChef