摘要: 前序遍历的非递归实现 1 void PreOrder2(BTNode *root) { 2 BTNode *p = root; 3 stack<BTNode *> S; 4 while (p != NULL || !S.empty()) { 5 if (p) { 6 cout << p->val < 阅读全文
posted @ 2020-07-11 18:13 Veritas_des_Liberty 阅读(239) 评论(0) 推荐(0) 编辑