Question: Write pseudocode to search for an element v in array A of size n. If you find the element, you return the index(array indices starts
Write pseudocode to search for an element v in array A of size n. If you find the element, you return the index(array indices starts with 1 and ends with n) of the element v. otherwise you should return special index NIL.
Hint: you should pass A and V as parameters.Return index i, if found. NIL otherwise.
Do not write Java code, pseudocode only.
Step by Step Solution
There are 3 Steps involved in it
To write pseudocode for the linear search algorithm to find an element v in an array A of size n fol... View full answer
Get step-by-step solutions from verified subject matter experts
