Amazon Interview Question: Binary search on a sorted arr... | Glassdoor

Interview Question

Software Development Engineer Intern Interview(Student Candidate)

Binary search on a sorted array that was rotated once


Interview Answer

2 Answers


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

Interview Candidate on Oct 28, 2013

@Anonymous Employee,

Rotated by how many elements?

Vicks on Nov 2, 2013

Add Answers or Comments

To comment on this, Sign In or Sign Up.