complete invertTree

This commit is contained in:
cediackermann 2026-06-15 08:44:34 +02:00
parent 9e84d50bb5
commit 34fa731bf6
No known key found for this signature in database

View file

@ -9,18 +9,17 @@
// print(LeetCode.singleNumber([4, 1, 2, 1, 2])) // print(LeetCode.singleNumber([4, 1, 2, 1, 2]))
// print(LeetCode.containsDuplicate([1, 2, 3, 4])) // print(LeetCode.containsDuplicate([1, 2, 3, 4]))
// print(LeetCode.productExceptSelf([-1, 1, 0, -3, 3])) // print(LeetCode.productExceptSelf([-1, 1, 0, -3, 3]))
// let tree = TreeNode(
let tree = TreeNode( // 4,
4, // TreeNode(
TreeNode( // 2,
2, // TreeNode(1),
TreeNode(1), // TreeNode(3)
TreeNode(3) // ),
), // TreeNode(
TreeNode( // 7,
7, // TreeNode(6),
TreeNode(6), // TreeNode(9)
TreeNode(9) // )
) // )
) // // print(LeetCode.invertTree(tree))
print(LeetCode.invertTree(tree))