Binance interview question

How do you construct a tree in typescript