Passed Test Case 2 and Test Case 1

Modified sort() so that Test Case 1 and 2 are passed