© Shirish Chavan 2017

Shirish Chavan, C Recipes, https://doi.org/10.1007/978-1-4842-2967-5_9

9. Searching and Sorting

Shirish Chavan

(1)Sangli, Maharashtra, India

The current English meaning of the terms “searching” and “sorting” also holds good in computer science. Sometimes, this is not the case. For example, the current English meaning of the terms “root,” “garbage” or “tree” is very different from their meaning in computer science.

Note

Searching is the process of finding the location of a desired element from a group of elements.

For searching, generally following methods are used:

  • Linear search,

  • Binary search,

  • Interpolation search.

Note

Sorting is the process of arranging the elements in desired order (e.g., ascending or descending, etc.), given ...

Get C Recipes: A Problem-Solution Approach now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.