Bloomberg interview question

Algorithms