Apps Associates Interview Question

binary search, basic oops concept