Sorting means reorganizing the data in such as way that it is in the order of smallest to largest. Sorting is one of the most important issues in data structures and computing. Data is regularly sorted before being sorted, as it can then very efficiently be retrieved, be it a collection of names, telephone numbers, or items on a simple to-do list.
In this chapter, we'll study some of the most important and popular sorting techniques, including the following:
- Bubble sort
- Insertion sort
- Selection sort
- Quick sort
- Heap sort
In this chapter, we compare different sorting algorithms by considering their asymptotic behavior. Some of the algorithms are relatively easy to develop, but may perform poorly, whereas other algorithms are slightly more complex to implement, but show good performance in sorting the list when we have a long lists.
After sorting, it becomes much...