BlackRock interview question

OOP & algorithm question