Analysis of Algorithms : An Active Learning Approach

(Ron) #1
RESULTS OF CHAPTER STUDY SUGGESTIONS 269

Quicksort


After merging loca-
tion 9 to location 10: 14689101516371114251213
After merging loca-
tion 11 to location 12: 14689101516371114251213
After merging loca-
tion 9 to location 12: 14689101516371114251213
After merging loca-
tion 13 to location 14: 14689101516371114251213
After merging loca-
tion 15 to location 16: 14689101516371114251213
After merging loca-
tion 13 to location 16: 14689101516371114251213
After merging loca-
tion 9 to location 16: 14689101516235711121314
After merging loca-
tion 1 to location 16: 12345678910111213141516


The Original List:62471385
Pivot location 6:52413687
Pivot location 5:32415687
Pivot location 3:12345687
Pivot location 1:12345687
Pivot location 8:12345678

The Original List: 15 4 1 0869161731114251213
Pivot location 15: 13 4 1 0869173111425121516
Pivot location 13: 12 4 1 0869173112513141516
Pivot location 12: 5 4 1 08691731121213141516
Pivot location 5:24135910781161213141516
Pivot location 2:12435910781161213141516
Pivot location 4:12345910781161213141516
Pivot location 9:12345678911101213141516
Pivot location 6:12345678911101213141516
Pivot location 7:12345678911101213141516
Pivot location 11:12345678910111213141516
Free download pdf