Convert a plain array of nodes (with pointers to parent nodes) to a tree
github.com/alferov/array-to-tree
alferov/array-to-tree