Sequence traversal, or the storage structure of the triplicate tree, is as follows | id | parent | l_child | m_child | r_child | & nbsp; I need to specify a node and insert a child node, the minimum distance between the node and the specified node is required, and the node is inserted into sequence traversal in the order of priority (l-& gt; m-& gt; r), or a complete triples tree is constructed.
The storage structure of the Sankey tree is as follows:
| Id | parent | l_child | m_child | r_child |
Now I need to specify a node and insert a child node, which requires that the node be the least distance from the specified node and be inserted in the order of priority l-> m-> r, that is, when the number of inserted nodes reaches a certain number, it can become a completely Triple Tree.
------ Solution --------------------
....
}
}
Return a ($ tree, $ uid );
}