NAME:

LOGIN:

PRECEPT:

COS 226 Exercises on Elementary Sorting


1. Which, if any, of the following programs from the textbook are stable: selection (Program 6.12), insertion (Program 6.13), or bubblesort (Program 6.14)?



















2. [Exercise 6.36] Which of the three elementary methods (selection sort, insertion sort, or bubble sort) runs fastest for a large file in reverse order?