You will be creating a merge sort algorithm on linked list. You are given a complete class definition for a linked list node, and the linked list container type.
Assignment Deliverables
Be sure to use the specified file name(s) and to submit your files for grading via D2L Dropbox before the project deadline.
· MergeSort.py
Assignment Specifications
Your task will be to complete the method listed below.
· def MergeSort(head) :
This function takes a linked list node which should be the start of the linked list. Sorts the linked list and returns the head of the newly sorted list. This algorithm should have a run time of O(n*log(n)). There are no requirements on space complexity.
You can make additional helper functions, if useful.
Assignment Notes
Points will be deducted if your solution has any warnings of type:
· There will be a 75% deduction to the final score for any solution that uses any auxiliary container type (python’s built-in lists, tuples, sets, dictionaries, etc) besides the already defined LinkedList type.
· MergeSort function should run in O(n*log(n)) time.
· The linked list node & linked list should not be edited in anyway.
· You are required to complete the docstrings for any unmade and created function signatures.
· To test your classes, main.py is provided. Compare your results to the output below.
· Errors when using your solution that cause the grading script to fail will result in a 25% deduction.
· You may not change any function signatures in anyway, which include class definitions.
· Your solution will be ran against 10 testcases checking for various edge cases against your solution.