Which statement is correct? Linear search
-
A
Makes better use of space than a simple queue
-
B
Has at most 2^(h+1) − 1 nodes
-
C
Visits the nodes in sorted order
-
D
Has a time complexity of O(n)
Correct answer
Correct answer
D. Has a time complexity of O(n)
Explanation
Linear search has a time complexity of O(n).
Doubts & discussion
Not sure why the answer is D? Ask here and get an explanation.
Ask a doubt about this MCQ