HackerRank Day 20: Sorting problem solution - TheCScience