I wrote pseudo-code that finds the k'th number in a k rotate-sorted array. A
k rotate-sorted array is an array for which A[k]<A[K+1]<...<A[1]<...<A[N]<...<A[K-1]
.
So in this array:
[3,4,5,6,7,1,2]
k=5
I'm having a hard time proving why my code is correct
find_k'th :
start=A[1]
end = A[n]
while ( A[start]>A[end])
start=A[floor(start+end)/2]
return start;