Skip to content

docs: add complexity analysis to bubble_sort docstrings#2

Open
Aditya70-creator wants to merge 3 commits into
masterfrom
Aditya70-creator-patch-2
Open

docs: add complexity analysis to bubble_sort docstrings#2
Aditya70-creator wants to merge 3 commits into
masterfrom
Aditya70-creator-patch-2

Conversation

@Aditya70-creator

Copy link
Copy Markdown
Owner

Closes TheAlgorithms#14593

Description

Added detailed Time and Space Complexity analysis (Worst, Average, and Best cases) using Big O notation to the docstrings of both bubble_sort_iterative and bubble_sort_recursive implementations.

  • Add an algorithm?
  • Fix a bug or typo in an existing algorithm?
  • Add or change doctests? -- Note: Please avoid changing both code and tests in a single pull request.
  • Documentation change?

Checklist:

  • I have read CONTRIBUTING.md.
  • This pull request is all my own work -- I have not plagiarized.
  • I know that pull requests will not be merged if they fail the automated tests.
  • This PR only changes one algorithm file. To ease review, please open separate PRs for separate algorithms.
  • All new Python files are placed inside an existing directory.
  • All filenames are in all lowercase characters with no spaces or dashes.
  • All functions and variable names follow Python naming conventions.
  • All function parameters and return values are annotated with Python type hints.
  • All functions have doctests that pass the automated testing.
  • All new algorithms include at least one URL that points to Wikipedia or another similar explanation.
  • If this pull request resolves one or more open issues then the description above includes the issue number(s) with a closing keyword: "Fixes #ISSUE-NUMBER".

Aditya70-creator and others added 3 commits June 19, 2026 09:17
Added time and space complexity analysis for both iterative and recursive bubble sort implementations.
Bumps [actions/checkout](https://github.com/actions/checkout) from 6 to 7.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v6...v7)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve docstrings in sorts/bubble_sort.py to include complexity analysis

1 participant