Bloomberg interview question

Algorithms and datastructure