Python icon indicating copy to clipboard operation
Python copied to clipboard

Enhance docstring for selection_sort function

Open 2400031832 opened this issue 1 month ago • 0 comments

Describe your change:

Enhanced the docstring for the selection_sort function to address documentation inconsistencies (Issue #13948).

Changes made:

  • Added a more detailed description of how selection sort works
  • Added Time Complexity: O(n^2) with explanation
  • Added Space Complexity: O(1) with explanation
  • Kept existing examples and doctests
  • [x] Documentation change?

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 08:11 2400031832