Searching and Sorting
Overview
A huge amount of computing time is devoted to searches
in collections of data. As explained in the first lecture in this part of the
course, searches are much more efficient than they otherwise be if the
“key”, being searched for, is part of a set that has a total order,
and if the collection of elements that is being searched through, to find the
key, is sorted in non-decreasing order.
A variety of efficient sorting algorithms are, therefore, presented and
analyzed.
Lecture #14: Basic Algorithms for Searching and Sorting
Required Reading
Lecture Presentation
Tutorial #13: More About Binary Search
Lecture #15: Merge Sort
Required Reading
Lecture Presentation
Tutorial #14: Merge Sort
Lecture #16: Binary Heaps
Required Reading
Lecture Presentation
Java Code: Unbounded Heaps
Java Code: Bounded Heaps
Tutorial #15: Implementing an Unbounded Binary Heap
Lecture #17: Applications of Binary Heaps
Required Reading
Lecture Presentation
Tutorial #16: Making Heap Sort a Little Bit More Efficient
Lecture #18: Quick Sort
Required Reading
Lecture Presentation
Tutorial #17: Quick Sort
Assignment #3: A Fast Algorithm for “Selection”