Skip to content

Commit 78b3e70

Browse files
authored
Update convert_sorted_list_to_balanced_bst.py
1 parent 89fa4e6 commit 78b3e70

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

convert_sorted_list_to_balanced_bst.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
"""
@@ -30,4 +30,6 @@ def sortedListToBST(self, head):
3030
if head != first_node:
3131
root.left = self.sortedListToBST(head)
3232
root.right = self.sortedListToBST(new_head)
33-
return root
33+
return root
34+
35+
# medium: http://lintcode.com/zh-cn/problem/convert-sorted-list-to-balanced-bst/

0 commit comments

Comments
 (0)