Define a family of interchangeable algorithms, encapsulate each one, and select between them at runtime — a sorter that can switch between ascending and descending order without changing Sorter itself.
Implement `AscendingStrategy`/`DescendingStrategy` (sort(arr)) and Sorter.sort(arr), which delegates to whichever strategy it holds.
solve(arr, strategyName) picks the strategy by name and returns the sorted array (the original arr must be left untouched).
Sample tests