Amazon Interview Question

Binary search on a sorted array that was rotated once

Interview Answers

Anonymous

Oct 29, 2013

look at middle of array, one half is sorted, one half is rotated once, binary search the sorted part, repeat on the rotated part.

1

Anonymous

Nov 3, 2013

@Anonymous Employee, Rotated by how many elements?