CBSE Class 12 Computer Science Question 7 of 68

Data Structures - I : Linear Lists — Question 3

Back to all questions
3
Question

Question 3

When would you go for linear search in an array and why?

Answer

If the array is unsorted and the number of elements in the array are less then we should prefer linear search because the overhead of sorting the array will be more than traversing the complete array for finding the required element.