Skip to content

Commit 677a29c

Browse files
authored
Update balanced_binary_tree.py
1 parent 1c690dc commit 677a29c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

balanced_binary_tree.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# -*- coding: utf-8 -*-
1+
# coding: utf-8
22

33
class Solution:
44
"""
@@ -18,4 +18,6 @@ def isBalanced(self, root):
1818
def _isBalanced(self, root):
1919
if not root:
2020
return 0
21-
return 1 + max(self._isBalanced(root.left), self._isBalanced(root.right))
21+
return 1 + max(self._isBalanced(root.left), self._isBalanced(root.right))
22+
23+
# easy: http://lintcode.com/zh-cn/problem/balanced-binary-tree/

0 commit comments

Comments
 (0)