Skip to content

Commit 49633c2

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent c1575a1 commit 49633c2

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

data_structures/binary_tree/binary_tree_maximum_path_sum.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ def __init__(self, val: int) -> None:
2626

2727

2828
class GetMaxPathSum:
29-
3029
r"""
3130
3231
GetMaxPathSum takes root node of a tree as initial argument.
@@ -67,7 +66,6 @@ def __init__(self, root) -> None:
6766
self.root = root
6867

6968
def traverse(self, root: TreeNode | None) -> int:
70-
7169
"""
7270
Returns maximum path sum by recursively taking max_path_sum from left
7371
and max_path_sum from right if current Node has a left or right Node.
@@ -88,7 +86,6 @@ def traverse(self, root: TreeNode | None) -> int:
8886
return root.val + max(right_sum, left_sum)
8987

9088
def max_path_sum(self) -> int:
91-
9289
"""
9390
Driver method to get max_path_sum by calling traverse method.
9491
:return max_path_sum:
@@ -124,7 +121,7 @@ def construct_tree() -> TreeNode:
124121
return root
125122

126123

127-
if __name__ == '__main__':
124+
if __name__ == "__main__":
128125
import doctest
129126

130127
tree = GetMaxPathSum(construct_tree())

0 commit comments

Comments
 (0)