1.

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 usedThe question was asked at a job interview.This intriguing question comes from Searching in section Searching of Data Structures & Algorithms II

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).



Discussion

No Comment Found

Related InterviewSolutions