[Surface] to prove safety questions offer the next node in the binary tree 8

Interview questions 8. next node binary tree

NowCoder

Title Description
Given a binary tree and a node which is, how to find the next node in a preorder traversal order? In addition to the node in the tree are pointers to two child nodes other than the left and right, as well as a pointer pointing to the parent node.

Java implementation
strategy

Guess you like

Origin www.cnblogs.com/hglibin/p/10930092.html