Skip to content

Commit 1dc1b4d

Browse files
Update quick_select.py
1 parent f8899cd commit 1dc1b4d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

searches/quick_select.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ def median(items: list):
8686
>>> median(d)
8787
6.0
8888
"""
89-
mid, rest = divmod(len(items), 2)
90-
if rest != 0:
89+
mid, rem = divmod(len(items), 2)
90+
if rem != 0:
9191
return quick_select(items=items, index=mid)
9292
else:
9393
low_mid = quick_select(items=items, index=mid - 1)

0 commit comments

Comments
 (0)