Solved Medium Problem: Sorting