Bloomberg Interview Question

The coding question was not hard.