Amazon Interview Question

BINARY SEARCH to compose data