From 6ec3f59800f8f2b1c16e9c76772bcddfadb1ab1f Mon Sep 17 00:00:00 2001 From: Aarav Arya Date: Tue, 24 Feb 2026 13:52:07 -0500 Subject: [PATCH 1/4] Added type hints for bogo_sort --- sorts/bogo_sort.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sorts/bogo_sort.py b/sorts/bogo_sort.py index 9c133f0d8a55..d4b88ac26508 100644 --- a/sorts/bogo_sort.py +++ b/sorts/bogo_sort.py @@ -16,7 +16,7 @@ import random -def bogo_sort(collection): +def bogo_sort(collection: list[int]) -> list[int]: """Pure implementation of the bogosort algorithm in Python :param collection: some mutable ordered collection with heterogeneous comparable items inside @@ -30,7 +30,7 @@ def bogo_sort(collection): [-45, -5, -2] """ - def is_sorted(collection): + def is_sorted(collection: list[int]) -> bool: for i in range(len(collection) - 1): if collection[i] > collection[i + 1]: return False From 08f148bde6c35352875f41b6c84301c195b88838 Mon Sep 17 00:00:00 2001 From: Aarav Arya Date: Tue, 31 Mar 2026 19:11:42 -0400 Subject: [PATCH 2/4] Add type hints to unknown_sort --- sorts/unknown_sort.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sorts/unknown_sort.py b/sorts/unknown_sort.py index 9fa9d22fb5e0..0d792169fa27 100644 --- a/sorts/unknown_sort.py +++ b/sorts/unknown_sort.py @@ -6,7 +6,7 @@ """ -def merge_sort(collection): +def merge_sort(collection: list[int]) -> list[int]: """Pure implementation of the fastest merge sort algorithm in Python :param collection: some mutable ordered collection with heterogeneous From 9177fc9155c5bd00b5c8995706ec51d35c889d2e Mon Sep 17 00:00:00 2001 From: Maxim Smolskiy Date: Sat, 11 Apr 2026 00:01:00 +0300 Subject: [PATCH 3/4] Update bogo_sort.py --- sorts/bogo_sort.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sorts/bogo_sort.py b/sorts/bogo_sort.py index d4b88ac26508..70785140ee5c 100644 --- a/sorts/bogo_sort.py +++ b/sorts/bogo_sort.py @@ -16,7 +16,7 @@ import random -def bogo_sort(collection: list[int]) -> list[int]: +def bogo_sort(collection: list) -> list: """Pure implementation of the bogosort algorithm in Python :param collection: some mutable ordered collection with heterogeneous comparable items inside @@ -30,7 +30,7 @@ def bogo_sort(collection: list[int]) -> list[int]: [-45, -5, -2] """ - def is_sorted(collection: list[int]) -> bool: + def is_sorted(collection: list) -> bool: for i in range(len(collection) - 1): if collection[i] > collection[i + 1]: return False From f1e6d7c56ab35b9d9ad945b57dcc78cf9c4636a3 Mon Sep 17 00:00:00 2001 From: Maxim Smolskiy Date: Sat, 11 Apr 2026 00:01:28 +0300 Subject: [PATCH 4/4] Update unknown_sort.py --- sorts/unknown_sort.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sorts/unknown_sort.py b/sorts/unknown_sort.py index 0d792169fa27..3545da68ea80 100644 --- a/sorts/unknown_sort.py +++ b/sorts/unknown_sort.py @@ -6,7 +6,7 @@ """ -def merge_sort(collection: list[int]) -> list[int]: +def merge_sort(collection: list) -> list: """Pure implementation of the fastest merge sort algorithm in Python :param collection: some mutable ordered collection with heterogeneous