- Iv 15 Points Let A 1 N Be An Array Of N Numbers Where N 22 Sat Isfying That There Is An Index 1 I N Such That Al 1 (35.84 KiB) Viewed 27 times
IV. (15 points) Let A[1..n] be an array of n numbers, where n 22, sat- isfying that there is an index 1
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
IV. (15 points) Let A[1..n] be an array of n numbers, where n 22, sat- isfying that there is an index 1
IV. (15 points) Let A[1..n] be an array of n numbers, where n 22, sat- isfying that there is an index 1<i<n such that all the numbers in the subarray A[1..] are positive and all the numbers in the subarray Ali+1..n) are negative. Note that the index i is not given (i.e., is not. known). Give an O(lg n)-time algorithm that computes the index i.