Python icon indicating copy to clipboard operation
Python copied to clipboard

Enhance docstring with complexity analysis

Open 2400031832 opened this issue 1 month ago • 0 comments

Added time and space complexity analysis to the selection_sort function docstring.

Related to #13948 - Documentation inconsistencies

Describe your change:

  • [x] Documentation change?

Changes:

  • Added Time Complexity: O(n^2) to selection_sort docstring
  • Added Space Complexity: O(1) to selection_sort docstring

This improves documentation consistency by adding complexity analysis that helps beginners understand the algorithm's performance characteristics.

Checklist:

  • [x] I have read 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 the automated tests.
  • [x] This PR only changes one algorithm file. To ease review, please open separate PRs for separate algorithms.

2400031832 avatar Nov 25 '25 07:11 2400031832