Linear Search
|
Binary Search
|
(i)
Linear
search doesn’t require the input data to be stored.
|
(i)
Binary
search requires the input data to be stored.
|
(ii)
Linear
search only requires equality comparisons.
|
(ii)
Binary
search an ordering comparisons.
|
(iii)
Linear
search only requires sequential access.
|
(iii)
Binary
search requires random access to the data.
|
(iv)
Linear
search has complexity O(n).
|
(iv)
Binary
search has complexity O (log n).
|
(v)
Single
/ multi-dimensional array used.
|
(v)
Only
single dimensional array used.
|
(vi)
Any
relation operator used.
|
(vi)
Only
“=” relation operator is used.
|
(vii)
Access
is low.
|
(vii)
Access
is faster.
|
10 March 2018

What are the differences between linear search and binary search
You May Also Like
- Algorithm Design
What is the use of Dijkstra’s algorithmApr 06, 2018
- Algorithm Design
- Algorithm Design
- Algorithm Design
How does Divide and Conquer method workApr 01, 2018
Newer Article
Write down the advantage and disadvantage of BFS and DFS traversal algorithm
Older Article
Complexity analysis of the Merge sort algorithm
Labels:
Algorithm Design
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment