Where is linear searching used?

Lê Như Ý

New member
Where is linear searching used?
A. When the list has only a few elements
B. When performing a single search in an unordered list
C. Used all the time
D. When the list has only a few elements and When performing a single search in an unordered list
 
Answer: D
Explanation: It is practical to implement linear search in the situations mentioned in When the list has only a few elements and When performing a single search in an unordered list, but for larger elements the complexity becomes larger and it makes sense to sort the list and employ binary search or hashing.
 

Tìm kiếm

Back
Top