is linear search is faster than binary search ? state whether true or false.
Answers
Answered by
1
It really depends but generally the answer would be false
Answered by
0
False.
Binary search actually takes lesser duration than the linear search, to understand we must go through the mechanism of each search.
Linear search goes through one by one data and checks one data at a time. Such that it will never jump to another without scanning the previous data which means that it cannot work on two datas simultaneously.
Meanwhile, binary search checks two data at a time in the provided list. Such that the running time of the search reduced to half which means that it can work on two datas simultaneously.
Similar questions