Jane Street Interview Question

The question had to do with creating a tree based on a list.