Question: Please write code with PYTHON. Problem IMergesort Linked List. ( 4 0 pts ) Implement mergesort algorithm for the linked list data structure. You should

Please write code with PYTHON.
Problem IMergesort Linked List. (40 pts) Implement mergesort algorithm for the linked list data structure. You should follow the Node and linked list implementation from the classes and add functionality where necessary. Mergesort implementation can be either recursive or iterative, that is your choice. You must have separate merge and mergesort functions.Problem IIQuicksort Linked List. (40 pts) Implement quicksort algorithm with partitions for linked list data structure. You can use your previous implementation of Node and LinkedList from Task I. Similar to the previous task, you must have separate functions for partition and quicksort.Problem IIIComparison (20 pts) Compare your quicksort and mergesort implementations in terms of runtime for linked lists of sizes 100,500,2500,12500. You can generate the numbers randomly and fill the linked lists. Note that linked lists should be the same for both algorithms to be comparable. Draw a time/size plot using matplotlib for both algorithms.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!