BuyHatke Interview Question

Design pattern problem can be solved using binarysearch and hashing