pre -> post

This commit is contained in:
Jidong Xiao
2025-03-28 02:36:17 -04:00
committed by JamesFlare
parent f5c43c914e
commit 900469a9ec

View File

@@ -9,7 +9,7 @@ public:
TreeNode(int x) : val(x), left(nullptr), right(nullptr) {}
};
// pre order traverse a binary tree, iteratively.
// post order traverse a binary tree, iteratively.
void postorderTraversal(TreeNode* root) {
if (root == nullptr) return;