Skip to content

Commit af33297

Browse files
committed
invert binary tree: TC, SC 추가
1 parent 6a624af commit af33297

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

invert-binary-tree/eunhwa99.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
class Solution {
22

3+
// TC : O(N)
4+
// SC : O(1)
35
public TreeNode invertTree(TreeNode root) {
46
if (root == null) {
57
return null;
@@ -16,3 +18,4 @@ public TreeNode invertTree(TreeNode root) {
1618
}
1719

1820
}
21+

0 commit comments

Comments
 (0)