sorts.exchange_sort =================== .. py:module:: sorts.exchange_sort Attributes ---------- .. autoapisummary:: sorts.exchange_sort.user_input Functions --------- .. autoapisummary:: sorts.exchange_sort.exchange_sort Module Contents --------------- .. py:function:: exchange_sort(numbers: list[int]) -> list[int] Uses exchange sort to sort a list of numbers. Source: https://en.wikipedia.org/wiki/Sorting_algorithm#Exchange_sort >>> exchange_sort([5, 4, 3, 2, 1]) [1, 2, 3, 4, 5] >>> exchange_sort([-1, -2, -3]) [-3, -2, -1] >>> exchange_sort([1, 2, 3, 4, 5]) [1, 2, 3, 4, 5] >>> exchange_sort([0, 10, -2, 5, 3]) [-2, 0, 3, 5, 10] >>> exchange_sort([]) [] .. py:data:: user_input