KnowledgeBoat Logo

Computer Science

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

Linear Lists

1 Like

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.

Answered By

1 Like


Related Questions