Question: Fix an array A [ 1 : n ] with distinct entries. This array may not be sorted. An index 2 < = j <
Fix an array A : n with distinct entries. This array may not be sorted. An index j n is a
local minimum if A j A j and A j A j is a local minimum if A A and n is a
local minimum if An An
Design an Olog n algorithm to find some local minimum.
You need to give an argument of why your algorithm is correct. A formal proof via induction
defining predicates etc is not needed; what is needed is the key observation that convinces a reader
why your algorithm is correct.
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
