azl397985856/leetcode

树专题中双色标记法后序和前序写反了

edte opened this issue · 2 comments

edte commented

image

前序应该是

push(right)
push(left)
push(root)

后序是
push(root)
push(right)
push(left)

应该和正常递归写法倒序

edte commented

好吧,原来之前有 issue 已经提过了,不过作者还是没有改过来呀

image

如图, 已在文中做了批注