Oursky Interview Question

Data structure / Design pattern / Simple Algo question