Add typing (#9651)

Co-authored-by: Jeremy Tan <jeremytan@stripe.com>
This commit is contained in:
Tan Kai Qun, Jeremy 2023-10-04 11:05:47 +09:00 committed by GitHub
parent 12431389e3
commit 28f1e68f00
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,4 +1,4 @@
def stooge_sort(arr):
def stooge_sort(arr: list[int]) -> list[int]:
"""
Examples:
>>> stooge_sort([18.1, 0, -7.1, -1, 2, 2])
@ -11,7 +11,7 @@ def stooge_sort(arr):
return arr
def stooge(arr, i, h):
def stooge(arr: list[int], i: int, h: int) -> None:
if i >= h:
return