Python
Python copied to clipboard
Enhance docstring for selection_sort function
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.