Python
Python copied to clipboard
feat: add recursive bubble sort algorithm with doctests and type hints
Implement recursive Bubble Sort algorithm with doctests
Describe your change
Added a recursive implementation of the Bubble Sort algorithm with proper type hints and doctests for automated verification.
Changes made
- Added new file:
sorting/bubble_sort_recursive.py - Implemented
bubble_sort_recursive()function. - Added detailed docstring with doctests.
- Added type hints for parameters and return values.
- Verified using
doctest,ruff, andmypy(all passed).
Checklist
- [x] I have read [CONTRIBUTING.md](https://github.com/TheAlgorithms/Python/blob/master/CONTRIBUTING.md).
- [x] This pull request is all my own work — I have not plagiarized.
- [x] I know that pull requests will not be merged if they fail automated tests.
- [x] This PR only changes one algorithm file.
- [x] All new Python files are placed inside an existing directory (
sorting/). - [x] All filenames are lowercase and contain no spaces or dashes.
- [x] All function and variable names follow Python naming conventions.
- [x] All function parameters and return values have type hints.
- [x] All functions include doctests that pass automated testing.
- [x] Includes at least one reference link to Wikipedia or similar explanation.
Reference
🔗 [Bubble Sort — Wikipedia](https://en.wikipedia.org/wiki/Bubble_sort)
Hi team,
I see that all checks have passed for this PR, and it adheres to the contribution guidelines, including the addition of doctests and type hints.
Could a maintainer please review it and, if appropriate, apply the hacktoberfest-accepted label? This would ensure the contribution counts towards Hacktoberfest.
Thanks for your time and for maintaining this great repository!
Hi maintainers, any update on this