Skip to content

Commit 3a6d82b

Browse files
committed
Runtime: 98 ms (Top 35.75%) | Memory: 14.7 MB (Top 20.30%)
1 parent 93fa003 commit 3a6d82b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scripts/algorithms/E/Evaluate Boolean Binary Tree/Evaluate Boolean Binary Tree.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
# Runtime: 98 ms (Top 35.75%) | Memory: 14.7 MB (Top 20.30%)
12
class Solution:
2-
def evaluateTree(self, root: Optional[TreeNode]) -> bool:
3+
def evaluateTree(self, root: Optional[TreeNode]) -> bool:
34
def recur(node):
45
if not node.left and not node.right: #leaf node
56
return True if node.val == 1 else False

0 commit comments

Comments
 (0)