Bummer! This is just a preview. You need to be signed in with an account to view the entire instruction.


Implementing Merge Sort on Linked Lists


def merge_sort(linked_list):
    Sorts a linked list in ascending order
    - Recursively divide the linked list into sublists containing a single node
    - Repeatedly merge the sublists to produce sorted sublists until one remains

    Returns a sorted linked list

    Takes O(n log n) time
    Takes O(n) space
    if linked_list.size() == 1:...