BlackRock interview question

Algorithms + complexity.