BlackRock interview question

Build a tree search.