A good answer might be:Linear Search | |
Searching for an Element
Linear search is starting at the first element and examining them one by
one until the target element is found.
You could write linear search for a
The method returns the index of the first occurrence of elem
or -1 if elem is not found.
| |
QUESTION 15:Examine the following program. What will it print?
|