Skip to content

Commit 3692057

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

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, left=None, right=None) -> 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):
6766
self.root = root
6867

6968
def traverse(self, root: TreeNode) -> 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) -> 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:
@@ -115,7 +112,7 @@ def construct_tree() -> TreeNode:
115112
return root
116113

117114

118-
if __name__ == '__main__':
115+
if __name__ == "__main__":
119116
import doctest
120117

121118
tree = GetMaxPathSum(construct_tree())

0 commit comments

Comments
 (0)