Binary Search is defined as a searching algorithm used in a sorted array by repeatedly dividing the search interval in half. The main principle used in the algorithm is to divide and conquer. The idea of binary search is to use the information that the array is sorted and reduce the time complexity to O(log N).
Conditions/Pre-requisite for Binary Search -
The data structure(array, list) must be sorted.
Access to any element of array/list takes constant time.
#datastructures #dsalgo #binarysearch #java
On this page of the site you can watch the video online Data Structures and Algorithms Binary Search | Time Complexity | DSA Programming with a duration of hours minute second in good quality, which was uploaded by the user Prashant Rana 20 March 2024, share the link with friends and acquaintances, this video has already been watched 32 times on youtube and it was liked by 8 viewers. Enjoy your viewing!