Python
Python copied to clipboard
Enhance docstring with complexity analysis
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.