Chapter 16

Sorting and Searching

This chapter provides an exclusive discussion regarding sorting and searching. In this chapter, a number of sorting techniques namely bubble sort, insertion sort, selection sort, quick sort, merge sort, shell sort, radix sort and heap sort are detailed. The chapter also gives a clear explanation about the very popular and frequently used searching techniques namely linear search, binary search and Fibonacci search.


Sorting is a technique to arrange a set of items in some order. One reason that it is so useful is that it is much easier to search for something in a sorted list than an unsorted one. Among the sorting algorithms, bubble sort, insertion sort and selection sort are good enough for most ...

Get Data Structures and Algorithms Using C++ now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.