Amazon interview question

BINARY SEARCH to compose data