Bloomberg Interview Question

Algorithm design