Skip to content

Commit 456a804

Browse files
authored
Update Count Good Nodes in Binary Tree - Leetcode 1448.py
1 parent e145d62 commit 456a804

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Count Good Nodes in Binary Tree - Leetcode 1448.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,6 @@ def goodNodes(self, root: TreeNode) -> int:
1414
if node.left: stk.append((node.left, largest))
1515

1616
return good_nodes
17+
18+
# Time Complexity: O(n)
19+
# Space Complexity: O(n)

0 commit comments

Comments
 (0)