Two Sigma Interview Question

Design-pattern implementation