Pergunta de entrevista da empresa Bloomberg

How to connect the siblings of the tree with a pointer