我发现我竟然学会了12种tree traversal的办法# JobHunting - 待字闺中
u*o
1 楼
且听本姑娘一一道来
1. pre-order recursive solution
2. pre-order iterative solution using stack
3. pre-order iteration using an iterator with stack
4. in-order recursive solution
5. in-order iterative solution using stack
6. in-order iteration using an iterator with stack
7. in-order iterative solution without stack, without parent pointer (
threaded tree)
8. in-order iterative solution without stack, with parent pointer
9. post-order recursive
10. post-order iterative using one stack
11. post-order iterative using two stacks
12. post-order iteration using an iterator
tree traversal 只是千万个知识点中的一个啊!!还有其他999个知识点,脑子都记住
真的大丈夫吗?不会炸掉吗?
我会告诉你我还没开始看level order吗????
码工不好当,入行需谨慎啊。
我还是去练练歌,去好声音参加选秀吧。。。
1. pre-order recursive solution
2. pre-order iterative solution using stack
3. pre-order iteration using an iterator with stack
4. in-order recursive solution
5. in-order iterative solution using stack
6. in-order iteration using an iterator with stack
7. in-order iterative solution without stack, without parent pointer (
threaded tree)
8. in-order iterative solution without stack, with parent pointer
9. post-order recursive
10. post-order iterative using one stack
11. post-order iterative using two stacks
12. post-order iteration using an iterator
tree traversal 只是千万个知识点中的一个啊!!还有其他999个知识点,脑子都记住
真的大丈夫吗?不会炸掉吗?
我会告诉你我还没开始看level order吗????
码工不好当,入行需谨慎啊。
我还是去练练歌,去好声音参加选秀吧。。。