One:
Using two stacks, stack to traversal the node, stackr to record the parent node when visiting its right-child;
https://oj.leetcode.com/problems/path-sum/
https://oj.leetcode.com/problems/binary-tree-postorder-traversal/
时间: 2024-11-07 15:06:42