Skip to content

Commit af389b0

Browse files
MathewAddalaMaximSmolskiycclauss
authored
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> Co-authored-by: cclauss <3709715+cclauss@users.noreply.github.com>
1 parent 23c0982 commit af389b0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sorts/bubble_sort.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def bubble_sort_recursive(collection: list[Any]) -> list[Any]:
6969
Examples:
7070
>>> bubble_sort_recursive([0, 5, 2, 3, 2])
7171
[0, 2, 2, 3, 5]
72-
>>> bubble_sort_iterative([])
72+
>>> bubble_sort_recursive([])
7373
[]
7474
>>> bubble_sort_recursive([-2, -45, -5])
7575
[-45, -5, -2]

0 commit comments

Comments
 (0)