Question: A second example, a call like this searchInLastN ( nums , 2 , 7 ) would check positions [ 8 ] and [ 9 ]
A second example, a call like this searchInLastN nums would check positions and and return not found as the value is not in the last positions.
searchInLastwnums
This should work for arrays of any size. You can assume that the array size is larger than the value in lastN.
Examples:
searchInLastN
searchInLastN
searchInLastN
searchInLastN
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
