Skip to content

Commit af00d57

Browse files
committed
Updated code
1 parent ac0709d commit af00d57

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

data_structures/binary_tree/maximum_sum_bst.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class TreeNode:
1212
right: 'TreeNode' = None
1313

1414

15-
def max_sum_bst(root: TreeNode | None) -> int:
15+
def max_sum_bst(root: TreeNode ) -> int:
1616
"""
1717
The solution traverses a binary tree to find the maximum sum of
1818
keys in any subtree that is a Binary Search Tree (BST). It uses
@@ -44,7 +44,7 @@ def max_sum_bst(root: TreeNode | None) -> int:
4444
"""
4545
ans: int = 0
4646

47-
def solver(node: TreeNode | None) -> tuple[bool, int, int, int]:
47+
def solver(node: TreeNode) -> tuple[bool, int, int, int]:
4848
"""
4949
Returns the maximum sum by making recursive calls
5050
>>> t1 = TreeNode(1)

0 commit comments

Comments
 (0)