Python icon indicating copy to clipboard operation
Python copied to clipboard

feat: add recursive bubble sort algorithm with doctests and type hints

Open vannu07 opened this issue 3 months ago • 2 comments

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, and mypy (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)

vannu07 avatar Oct 11 '25 08:10 vannu07

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!

vannu07 avatar Oct 11 '25 13:10 vannu07

Hi maintainers, any update on this

vannu07 avatar Oct 27 '25 04:10 vannu07