Which of the below statements are true about binary search algorithm?
i. Binary search is same as linear search in terms of time complexity (speed of a program to find an element)
ii. Linear search is faster than binary search
iii. binary search is faster than linear search
iv. if array is already sorted then both are same, else binary search is faster.
Binary search algorithm is faster than linear search, because in each iteration, we will skip half of the array elements while checking if element is available or not.
Back To Top