Q. The average case occurs in the Linear Search Algorithm when:
- The item to be searched is in somewhere middle of the Array
- The item to be searched is not in the array
- The item to be searched is in the last of the array
- The item to be searched is either in the last or not in the array
Answer: The item to be searched is in somewhere middle of the Array
The average case occurs in the linear search algorithm when the item to be searched is in somewhere middle of the Array.
Linear search is a very basic and simple search algorithm. In Linear search, we search an element or value in a given array by traversing the array from the starting, till the desired element or value is found.
No comments:
Post a Comment
What you have to say about this?