We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents fad07af + 09c8bf8 commit 33ca493Copy full SHA for 33ca493
Python/binary-tree-longest-consecutive-sequence.py
@@ -22,7 +22,7 @@ def longestConsecutiveHelper(root):
22
if root.right and root.right.val == root.val + 1:
23
cur_len = max(cur_len, right_len + 1)
24
25
- self.max_len = max(self.max_len, cur_len, left_len, right_len)
+ self.max_len = max(self.max_len, cur_len)
26
27
return cur_len
28
0 commit comments