Question: In java languages please attach screen shot as well of the output. Part A - Write an algorithm for Merge - sort that uses queues.

In java languages please attach screen shot as well of the output.
Part A- Write an algorithm for Merge-sort that uses queues. Your algorithm must use the queue ADT that ( but must use the queues). That is, the input to the algorithm is a queue, and when partitioning is done, two queues are created (L and G). Then, L and G are sorted recursively in the same way and merged when sorted.
Part B -Implement your Merge-sort algorithm in Java language only. What are the worst, average and best-case time complexities in O-notation of Merge-sort algorithm?
Note: You can not write Part B until you answer Part A.

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 Databases Questions!