Skip to content

Commit 893abd3

Browse files
Merge branch 'master' into fix-binary-search-final
2 parents 5a9e860 + 791deb4 commit 893abd3

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

.github/workflows/sphinx.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
- run: uv sync --group=docs
4242
- uses: actions/configure-pages@v6
4343
- run: uv run sphinx-build -c docs . docs/_build/html
44-
- uses: actions/upload-pages-artifact@v4
44+
- uses: actions/upload-pages-artifact@v5
4545
with:
4646
path: docs/_build/html
4747

sorts/pigeonhole_sort.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@ def pigeonhole_sort(a):
1010
>>> pigeonhole_sort(a) # a destructive sort
1111
>>> a == b
1212
True
13+
14+
>>> pigeonhole_sort([])
1315
"""
16+
if not a:
17+
return
1418
# size of range of values in the list (ie, number of pigeonholes we need)
1519

1620
min_val = min(a) # min() finds the minimum value
@@ -38,7 +42,7 @@ def pigeonhole_sort(a):
3842
def main():
3943
a = [8, 3, 2, 7, 4, 6, 8]
4044
pigeonhole_sort(a)
41-
print("Sorted order is:", " ".join(a))
45+
print("Sorted order is:", *a)
4246

4347

4448
if __name__ == "__main__":

sorts/unknown_sort.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"""
77

88

9-
def merge_sort(collection):
9+
def merge_sort(collection: list) -> list:
1010
"""Pure implementation of the fastest merge sort algorithm in Python
1111
1212
:param collection: some mutable ordered collection with heterogeneous

0 commit comments

Comments
 (0)