Fix doctest bug in bubble_sort_recursive - incorrect function call (#13821)

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.

Co-authored-by: Maxim Smolskiy <mithridatus@mail.ru>
This commit is contained in:
ADDALA MATHEW
2026-03-09 22:58:01 +05:30
committed by GitHub
parent 9ea690e098
commit 32a3d0d0bb

View File

@@ -69,7 +69,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]