mirror of
https://github.com/TheAlgorithms/Python.git
synced 2026-03-13 09:50:19 +08:00
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:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user