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.
1 parent 82b8a74 commit 8cfd825Copy full SHA for 8cfd825
sorts/patience_sort.py
@@ -1,6 +1,7 @@
1
from bisect import bisect_left
2
from functools import total_ordering
3
from heapq import merge
4
+from typing import List
5
6
"""
7
A pure Python implementation of the patience sort algorithm
@@ -43,7 +44,7 @@ def patience_sort(collection: list) -> list:
43
44
>>> patience_sort([-3, -17, -48])
45
[-48, -17, -3]
46
- stacks = []
47
+ stacks: List[Stack] = []
48
# sort into stacks
49
for element in collection:
50
new_stacks = Stack([element])
0 commit comments