Amazon Interview Question

A shifted binary sort question.