Skip to content

Commit 7268d28

Browse files
Update pigeonhole_sort.py
1 parent a31a022 commit 7268d28

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

sorts/pigeonhole_sort.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@ def pigeonhole_sort(a):
1010
>>> pigeonhole_sort(a) # a destructive sort
1111
>>> a == b
1212
True
13+
14+
>>> pigeonhole_sort([])
1315
"""
14-
if not a:
15-
return # this handles empty list
16+
# if not a:
17+
# return # this handles empty list
1618
# size of range of values in the list (ie, number of pigeonholes we need)
1719

1820
min_val = min(a) # min() finds the minimum value

0 commit comments

Comments
 (0)