From 023dec3a3e6c793c55aa9a9ca01033cc78680f82 Mon Sep 17 00:00:00 2001 From: ADDALA MATHEW Date: Fri, 31 Oct 2025 14:24:38 +0530 Subject: [PATCH] Fix doctest bug in bubble_sort_recursive - incorrect function call Fixed bug in bubble_sort_recursive docstring where the doctest was calling bubble_sort_iterative([]) instead of bubble_sort_recursive([]). This was a copy-paste error that would cause the doctest to pass even if bubble_sort_recursive had issues with empty lists. Change: - Line 71: Changed '>>> bubble_sort_iterative([])' to '>>> bubble_sort_recursive([])' This ensures the doctest properly validates the recursive implementation. --- sorts/bubble_sort.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sorts/bubble_sort.py b/sorts/bubble_sort.py index 9ec3d5384f38..63b1f16a45cc 100644 --- a/sorts/bubble_sort.py +++ b/sorts/bubble_sort.py @@ -63,7 +63,7 @@ def bubble_sort_recursive(collection: list[Any]) -> list[Any]: Examples: >>> bubble_sort_recursive([0, 5, 2, 3, 2]) [0, 2, 2, 3, 5] - >>> bubble_sort_iterative([]) + >>> bubble_sort_recursive([]) [] >>> bubble_sort_recursive([-2, -45, -5]) [-45, -5, -2]