摘要: ``` //先序 void preOrder(TreeNode* root) { if(root == nullptr) return; stack s; auto p = root; while(p||!s.empty()) { while(p) { coutleft; } if(!s.empty()) { auto node = s.top(); s.pop(); p = node->righ 阅读全文
posted @ 2019-10-24 14:56 JohnRed 阅读(92) 评论(0) 推荐(0) 编辑
摘要: ![](https://img2018.cnblogs.com/blog/1430944/201910/1430944-20191024121855182-1353455632.png) 阅读全文
posted @ 2019-10-24 12:19 JohnRed 阅读(278) 评论(0) 推荐(0) 编辑