ListTSort
ListTSort is a generic sorting utility designed for lists of elements, where the element type is captured by a type parameter T. It provides a type-safe interface for sorting using either a user-provided comparator or the natural ordering of the elements. The design emphasizes stability, interoperability with common list interfaces, and predictable performance across typical workloads.
The core of ListTSort offers multiple sorting strategies that can be selected automatically or configured by
Complexity and behavior depend on the chosen strategy. The stable configurations typically provide O(n log n)
Usage commonly involves supplying a list of T and either a comparator function or a key extractor,