From 0784de7a59debfb4484cc34642cc3d33fe576fb2 Mon Sep 17 00:00:00 2001 From: karrad1201 Date: Wed, 4 Feb 2026 22:15:45 +0500 Subject: [PATCH] Add type annotations to merge_sort --- sorts/merge_sort.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sorts/merge_sort.py b/sorts/merge_sort.py index 11c202788035..10db332fa099 100644 --- a/sorts/merge_sort.py +++ b/sorts/merge_sort.py @@ -10,7 +10,7 @@ """ -def merge_sort(collection: list) -> list: +def merge_sort(collection: list[int]) -> list[int]: """ Sorts a list using the merge sort algorithm. @@ -29,7 +29,7 @@ def merge_sort(collection: list) -> list: [-45, -5, -2] """ - def merge(left: list, right: list) -> list: + def merge(left: list[int], right: list[int]) -> list[int]: """ Merge two sorted lists into a single sorted list.