Question: stuck please help An array A, has the following n elements: ky; kz;...; k: 91 92;...: 9m, where the sequence ki;k2; ...; ky is monotonically
An array A, has the following n elements: ky; kz;...; k: 91 92;...: 9m, where the sequence ki;k2; ...; ky is monotonically increasing and the sequence k: 91 92: ... ; 4m is monotonically decreasing. Also, I + m - n and I is unknown. Present an O(logn) (hint: divide and conquer) time function FindTransition(A, 1, n) to determine I, not the element value, but it's position. For example, if the input is 2,5; 11; 24; 8; 1, the answer is/ - 4
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
