sorts.odd_even_sort =================== .. py:module:: sorts.odd_even_sort .. autoapi-nested-parse:: Odd even sort implementation. https://en.wikipedia.org/wiki/Odd%E2%80%93even_sort Attributes ---------- .. autoapisummary:: sorts.odd_even_sort.input_list Functions --------- .. autoapisummary:: sorts.odd_even_sort.odd_even_sort Module Contents --------------- .. py:function:: odd_even_sort(input_list: list) -> list Sort input with odd even sort. This algorithm uses the same idea of bubblesort, but by first dividing in two phase (odd and even). Originally developed for use on parallel processors with local interconnections. :param collection: mutable ordered sequence of elements :return: same collection in ascending order Examples: >>> odd_even_sort([5 , 4 ,3 ,2 ,1]) [1, 2, 3, 4, 5] >>> odd_even_sort([]) [] >>> odd_even_sort([-10 ,-1 ,10 ,2]) [-10, -1, 2, 10] >>> odd_even_sort([1 ,2 ,3 ,4]) [1, 2, 3, 4] .. py:data:: input_list