2. Introduction:
Binary search is a search algorithm that find the
position of a target value with in a sorted array.
In binary search the data is particular order before
searching.
Binary search is also known as half interval search(because
of its fundamental operation of repeatedly dividing the search interval in half until it
finds the target ).
Binary search algorithm works on the principle of divide
and conquer.
Binary search can be implemented only sorted list of
element.
4. Time Complexity:
The running time complexity for binary search are of
three types
Worst Case, time complexity: 0(log n)
Average Case, time complexity: 0(log n)
Best Case, time complexity: 0(1)
5. Application:
The binary search is an efficient searching method
and used to search desired record from database.
Binary Search can be used to search for a file or
directory in a hierarchical structure.
Binary Search helps users locate books or
resources efficiently based on various criteria such
as author, title, or subject.
6. Advantages:
It is better than a linear search algorithm since its run
time complexity is 0(log N)
At each iteration, the binary search algorithm
eliminates half of the least and significantly reduce
the search space.
The binary search algorithm works even when the
array is rotate by some position and finds the target
element.
7. Disadvantage:
This algorithm requires the list is to be sorted the
only this method is applicable.
Complexity for Non-Numeric Data.
Inefficient for insertion and deletion.
The recursive method is used stack space.
Difficulty with Linked Lists.
8. Conclusion:
In conclusion, the Binary Search algorithm is a
fundamental and efficient technique for searching for a
specific element in a sorted array or list
Binary search is a search algorithm that allow us to find
element in a sorted list
Binary search is efficient because it continuously divides
the search space in half, until it find the element or only
one element remains in the list two be tested.