* fix(sorts): make smoothsort generic over Comparable items
* The TypeVar is no longer needed.
---------
Co-authored-by: Christian Clauss <cclauss@me.com>
2026-09-26 10:13:40 +02:00
Pranav M S Krishnanandpre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Add Smoothsort algorithm implementation
This adds the Smoothsort adaptive sorting algorithm by Edsger Dijkstra. It runs in O(n log n) worst case and O(n) when data is nearly sorted.
* Fix formatting and helper function compliance for Smoothsort
Updated comments and documentation for clarity on the smoothsort algorithm. Refactored internal helper function name and removed redundant code for Leonardo numbers.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fixing errors and re-implementing the algorithm
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update comments to use colons instead of dashes
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>