Skip to content

Commit 566a0f2

Browse files
committed
Update sort-list.py
1 parent 7971929 commit 566a0f2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: Python/sort-list.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Time: O(nlogn)
2-
# Space: O(1)
2+
# Space: O(logn) for stack call
33
#
44
# Sort a linked list in O(n log n) time using constant space complexity.
55
#
@@ -53,4 +53,4 @@ def mergeTwoLists(self, l1, l2):
5353
head.next = ListNode(4)
5454
head.next.next = ListNode(1)
5555
head.next.next.next= ListNode(2)
56-
print Solution().sortList(head)
56+
print Solution().sortList(head)

0 commit comments

Comments
 (0)