sorts.merge_sort ================ .. py:module:: sorts.merge_sort .. autoapi-nested-parse:: This is a pure Python implementation of the merge sort algorithm. For doctests run following command: python -m doctest -v merge_sort.py or python3 -m doctest -v merge_sort.py For manual testing run: python merge_sort.py Attributes ---------- .. autoapisummary:: sorts.merge_sort.user_input Functions --------- .. autoapisummary:: sorts.merge_sort.merge_sort Module Contents --------------- .. py:function:: merge_sort(collection: list) -> list Sorts a list using the merge sort algorithm. :param collection: A mutable ordered collection with comparable items. :return: The same collection ordered in ascending order. Time Complexity: O(n log n) Examples: >>> merge_sort([0, 5, 3, 2, 2]) [0, 2, 2, 3, 5] >>> merge_sort([]) [] >>> merge_sort([-2, -5, -45]) [-45, -5, -2] .. py:data:: user_input