Open Akasakar opened 4 years ago
problem: a more complicated but elegant solution that uses no stack but assumes that two point- ers can be tested for equality.
how to solve the other way you can see Morris Traversal
Morris Inorder Tree Traversal 二叉树的非递归遍历(不用栈、O(1)空间)
problem: a more complicated but elegant solution that uses no stack but assumes that two point- ers can be tested for equality.
how to solve the other way you can see Morris Traversal
Morris Inorder Tree Traversal 二叉树的非递归遍历(不用栈、O(1)空间)