Update 二叉树的统一迭代法.md

This commit is contained in:
fw_qaq
2022-11-08 12:51:43 +08:00
committed by GitHub
parent 1e40f295a9
commit fe46bb43d2

View File

@ -695,7 +695,7 @@ impl Solution{
res res
} }
// 中序 // 中序
pub fn inorder_traversal(root: Option<Rc<RefCell<TreeNode>>>) -> Vec<i32> { pub fn inorder_traversal(root: Option<Rc<RefCell<TreeNode>>>) -> Vec<i32> {
let mut res = vec![]; let mut res = vec![];
let mut stack = vec![]; let mut stack = vec![];
if root.is_some() { if root.is_some() {