Bloomberg Interview Question

I had a binary tree and matrix question