+1 vote
in Data Structures & Algorithms II by (110k points)
Linear search(recursive) algorithm used in _____________

(a) When the size of the dataset is low

(b) When the size of the dataset is large

(c) When the dataset is unordered

(d) Never used

The question was asked at a job interview.

This intriguing question comes from Searching in section Searching of Data Structures & Algorithms II

1 Answer

+1 vote
by (614k points)
selected by
 
Best answer
Correct choice is (a) When the size of the dataset is low

The best explanation: It is used when the size of the dataset is low as its runtime is O(n) which is more when compared to the binary search O(logn).

Related questions

Welcome to TalkJarvis QnA, a question-answer community website for the people by the people. On TalkJarvis QnA you can ask your doubts, curiosity, questions and whatever going in your mind either related to studies or others. Experts and people from different fields will answer.

Categories

...