Write the difference between linear search and binary search.
Answers
Answered by
2
Answer:
A linear search scans one item at a time, without jumping to any item. In contrast, binary search cuts down your search to half as soon as you find the middle of a sorted list. In linear search, the worst case complexity is O(n), where binary search making O(log n) comparisons. ... Linear search uses sequential approach.
Answered by
2
Answer:
linear search scans one item at a time, without jumping to any item. In contrast,bineary search cuts down your search to half as soon as you find the middle of a sorted list
Similar questions