Auction.com Interview Question

simple ds and algo