next up previous contents index CD CD Algorithms
Next: Approaches to Sorting Up: Data Structures and Sorting Previous: Sorting

Applications of Sorting

 

An important key to algorithm design is to use sorting as a basic building block, because once a set of items is sorted, many other problems become easy. Consider the following applications:  

While some of these problems (particularly median and selection) can be solved in linear time using more sophisticated algorithms, sorting provides quick and easy solutions to all of these problems. It is a rare application whose time complexity is such that sorting proves to be the bottleneck, especially a bottleneck that could have otherwise been removed using more clever algorithmics. Don't ever be afraid to spend time sorting whenever you use an efficient sorting routine.


next up previous contents index CD CD Algorithms
Next: Approaches to Sorting Up: Data Structures and Sorting Previous: Sorting

Algorithms
Mon Jun 2 23:33:50 EDT 1997