+ 1
Linear Search VS Binary Seach - Which One You Prefer ?
As linear seach can be done in one line ( using python ) where as binary search takes some exta line so why people choose linear over binary as the time complexity of binary is much better than linear search
4 Answers
+ 4
Yes, there is no need to sort the list first for the linear search.
+ 3
maybe the list is not sorted and it is not huge list.
+ 2
maybe people prefer simplicity over time complexity, i can understand why.
0
If you using the sorted values use Binary Search