Added Time Complexity O(n^2) and Space Complexity O(1) documentation to the selection_sort function docstring, improving code documentation for beginners as requested in issue #13948.
Co-authored-by: Christian Clauss <cclauss@me.com>
- Add detailed algorithm description explaining the approach
- Document time complexity O(n²) and space complexity O(1)
- Add 11 comprehensive doctest examples covering:
- Basic cases (already covered)
- Edge cases (single element, empty list)
- Sorted/reverse-sorted inputs
- Lists with duplicates
- Verification against standard library sorted() function
These improvements help new learners understand the algorithm better and verify correctness across diverse inputs.
* spelling corrections
* review
* improved documentation, removed redundant variables, added testing
* added type hint
* camel case to snake case
* spelling fix
* review
* python --> Python # it is a brand name, not a snake
* explicit cast to int
* spaces in int list
* "!= None" to "is not None"
* Update comb_sort.py
* various spelling corrections in documentation & several variables naming conventions fix
* + char in file name
* import dependency - bug fix
Co-authored-by: John Law <johnlaw.po@gmail.com>