October 2018
Beginner to intermediate
398 pages
11h 1m
English
The searching operation is to find out a given item from the stored data. If the searched item is available in the stored list then it returns the index position where it is located, or else it returns that the item is not found. The simplest approach to search for an item in a list is the linear search method, in which we look for items one by one in the whole list.
Let's take an example of 5 list items {60, 1, 88, 10, 11, 100} to understand the linear search algorithm, as shown in the following diagram:

The preceding list has elements that are accessible through the list index. To find an element in the list, we employ the ...