cs 201 GDB Solution 2022/23 @studytips3.0

Опубликовано: 03 Июль 2026
на канале: Study Tips 3.0
151
6

Reasons:
‪@studytips3.0‬ #sirnabeelch

Binary search is more efficient than linear search, as it searches the item by comparing it with the middle element. So, Binary search takes minimum time to search an element than a linear search (or sequential search). it has a time complexityof O(log n).

. At each iteration, the binary search algorithm eliminates half of the list and significantly reduces the search space. Binary search is faster as compared to linear search especially for larger data