Question: Consider an unsorted array A where M is the maximum element and m is the minimum element. Let n be the number of elements in
Consider an unsorted array A where M is the maximum element and m is
the minimum element. Let n be the number of elements in the array.
Show that there exist two elements Ai and Aj in the array A such that i j
and Ai AjM mn
Provide an algorithm to find such indices i and j
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
