Problem Reference
- Problem:
0226-invert-binary-tree.go
- Language: Go
- Section: 3. Iterative DFS
Issue Description
The code snippet under Iterative DFS for Go is currently displaying the recursive implementation instead of using an explicit stack.
Current Code (Incorrect):
func invertTree(root *TreeNode) *TreeNode {
if root == nil {
return nil
}
root.Left, root.Right = root.Right, root.Left
invertTree(root.Left)
invertTree(root.Right)
return root
}
Problem Reference
0226-invert-binary-tree.goIssue Description
The code snippet under Iterative DFS for Go is currently displaying the recursive implementation instead of using an explicit stack.
Current Code (Incorrect):