sorts.counting_sort =================== .. py:module:: sorts.counting_sort .. autoapi-nested-parse:: This is pure Python implementation of counting sort algorithm For doctests run following command: python -m doctest -v counting_sort.py or python3 -m doctest -v counting_sort.py For manual testing run: python counting_sort.py Attributes ---------- .. autoapisummary:: sorts.counting_sort.user_input Functions --------- .. autoapisummary:: sorts.counting_sort.counting_sort sorts.counting_sort.counting_sort_string Module Contents --------------- .. py:function:: counting_sort(collection) Pure implementation of counting sort algorithm in Python :param collection: some mutable ordered collection with heterogeneous comparable items inside :return: the same collection ordered by ascending Examples: >>> counting_sort([0, 5, 3, 2, 2]) [0, 2, 2, 3, 5] >>> counting_sort([]) [] >>> counting_sort([-2, -5, -45]) [-45, -5, -2] .. py:function:: counting_sort_string(string) >>> counting_sort_string("thisisthestring") 'eghhiiinrsssttt' .. py:data:: user_input