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
What do you mean by the following terms ?
(i) raw data
(ii) data item
(iii) data type
(iv) data structure
What do you understand by the following :
(i) simple data structures
(ii) compound data structures
(iii) linear data structures
(iv) non-linear data structures ?
State condition(s) when binary search is applicable.
Name the efficient algorithm offered by Python to insert element in a sorted sequence.