Skip to content

Commit c666db3

Browse files
vijayalaxmi777pre-commit-ci[bot]MaximSmolskiy
authored
Add Doc test bubble sort (#12070)
* The string manipulation - replace() * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update replace.py * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * updating DIRECTORY.md * Add doc test to bubble_sort * Update DIRECTORY.md * Delete strings/replace.py * Update bubble_sort.py --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: vijayalaxmi777 <vijayalaxmi777@users.noreply.github.com> Co-authored-by: Maxim Smolskiy <mithridatus@mail.ru>
1 parent 9fb51b4 commit c666db3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

sorts/bubble_sort.py

+2
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ def bubble_sort_recursive(collection: list[Any]) -> list[Any]:
8585
[1.1, 2.2, 3.3, 4.4, 5.5, 6.6, 7.7]
8686
>>> bubble_sort_recursive([1, 3.3, 5, 7.7, 2, 4.4, 6])
8787
[1, 2, 3.3, 4.4, 5, 6, 7.7]
88+
>>> bubble_sort_recursive(['a', 'Z', 'B', 'C', 'A', 'c'])
89+
['A', 'B', 'C', 'Z', 'a', 'c']
8890
>>> import random
8991
>>> collection_arg = random.sample(range(-50, 50), 100)
9092
>>> bubble_sort_recursive(collection_arg) == sorted(collection_arg)

0 commit comments

Comments
 (0)