Domanda di colloquio di Bloomberg

I had a binary tree and matrix question