asked 107k views
5 votes
Let a[0 . . . n] be an array of n + 1 natural numbers not exceeding n. let k < n be an integer such that the values of any two successive entries of a differ at most by k, i.e., |a[j] − a[j + 1]| ≤ k for all j ∈ {0, . . . , n − 1}. 1. prove that there exist an index j such that |a[j] − j| ≤ (k + 1)/2. 2. given the number k, find an o(log n) divide and conquer algorithm that finds such an index.

asked
User JakeHova
by
8.0k points

1 Answer

2 votes

Answer:

i really have no clue but if i put this i get points so good luck on your test

answered
User Jrdmcgr
by
8.7k points
Welcome to Qamnty — a place to ask, share, and grow together. Join our community and get real answers from real people.