【理解】二分搜索树的非递归后序遍历
void BST_postOrderNR(BST *bst) {
ArrayStack *as = create_array_stack(10);
lrNode *node = bst->root;
lrNode *pre = NULL;
while (!arrayStack_isEmpty(as) || node != NULL) {
while (node != NULL) {
push(as, node);
node = node->left;
}
lrN.
原创
2020-07-28 09:51:37 ·
238 阅读 ·
0 评论