Implementation of searching algorithms binary search
Algorithm:
1- Select the element in the middle of the array.
2- Compare the selected element to the searched element, if it is equal to the searched element, terminate.
3- If the searched element is larger than the selected element, repeat the search operation in the major part of the selected element.
4- If the searched element is smaller than the selected element, repeat the search in the smaller part of the selected element.
5- Repeat the steps until the smallest index in the search space is less than or equal to the largest index.