Which of the following is true about linear search?
Statement 1: linear search is used for an unsorted and unordered small list of elements.
Statement 2: If the searching element is found in the middle of the array, linear search compares the elements till the end of the array.
1
Only statement 1 is true
2
Only statement 2 is true
3
Both statement 1 and statement 2 are true
4
None is true
5
Question Not Attempted