A binary search is an algorithm to find a particular element in the list. Compare x with the middle element if the element is equal to x, we return the mid index. Compare x with the middle element if the element is greater than x, then x can only lie in left half of the array, eliminate the right half of array and we apply the same algorithm for left half. Compare x with the middle elemnet if the element is less than x, then x can only lie in right half of the array, eliminate the left half of array and we apply the same algorithm for right half.
-
Notifications
You must be signed in to change notification settings - Fork 0
UtkarshBhardwaj123/Binary-Search-Algorithm
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
About
A binary search is an algorithm to find a particular element in the list.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published