It is the process of finding the position of the given element.
1. Linear search:
In this method each element of the array is compared with the element to be searched starting from the first element. If it finds the position of the element in the array is returned.
2. Binary search:
It uses a technique called divide and conquer method. It can be performed only on sorted arrays. First we check the element with the middle element. There are 3 possibilities. The first possibility is the searched element is the middle element then search can be finished.
The second possibility is the element is less than the middle value so the upper bound is the middle element. The third possibility is the element is greater than the middle value so the lower bound is the middle element. Repeat this process.