This Repo is for Newbie who wants to start their journey in open source. Make sure not to make multiple pull requests otherwise will be identified as spammy .
array=[10,12,20,21,27,34,54]Key=27
It finds the middle element and compare greater or less than key element if less start moves to element after 21 now find the middle element again and compare greater of less than key element if greater
we get thekey value 27
Binary search reduces the searching process initially the array was of N size than N/2 , N/4 ,N/16.............,N/k^2
Binary Search to find element is an array .
array=[10,12,20,21,27,34,54]
Key=27
It finds the middle element and compare greater or less than key element if less start moves to element after 21 now find the middle element again and compare greater of less than key element if greater we get thekey value 27
Binary search reduces the searching process initially the array was of N size than N/2 , N/4 ,N/16.............,N/k^2
Time Complexity :- O(log2n)