Question: (15) 2a. Devise an algorithm that takes a list of n 2 1 integers and finds the position of the last even integer in the
(15) 2a. Devise an algorithm that takes a list of n 2 1 integers and finds the position of the last even integer in the list, or returns 0 if there are no even integers in the list. For example, the list 1, 3, 2, 14,7 returns 4 while the list 1, 3, 5 returns 0. b. What is the best O-notation for your algorithm? Why
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
