Home > Back-end >  According to one of the nodes to find all the parent and child nodes
According to one of the nodes to find all the parent and child nodes

Time:05-11

According to one of the nodes to find the dependence of the parent node and rely on all of his children?
Is a tree structure query find all of his superior one node and all subordinate node
Java implementation.

CodePudding user response:

Query his parent have continued to query his parent until there is no, then query him a subset of the query until no recursion

CodePudding user response:

The key is he this data type is a network data recursion can find its parent or the following nodes can't query all of the parent and child nodes at the same time
  • Related