Apps Associates interview question

binary search, basic oops concept