Question: 1. (Code and Pseudocode-no design) (20 marks Implement the SelectionSort algorithm operating on a doubly linked list implemented using three arrays: Prevll Nextl, Keyl Populate

 1. (Code and Pseudocode-no design) (20 marks Implement the SelectionSort algorithm
operating on a doubly linked list implemented using three arrays: Prevll Nextl,

1. (Code and Pseudocode-no design) (20 marks Implement the SelectionSort algorithm operating on a doubly linked list implemented using three arrays: Prevll Nextl, Keyl Populate your linked list and print it out. Run your sorting algorithm and print out the resulting linked list. Note: when you print out the linked list you should print each array underneath one another, e-g Prevl-1-1, 0, 1, 2,3,4 Key [10, 11, 12, 13, 14, 15 Next[] 1, 2, 3, 4, 5,-1] 1 indicates null. You have to include pseudocode for your solution. Your solution should print out the contents of the arrays at several stages of the application run but you do not need to include this output in the pseudocode. 2. (code only) (20 marks) You are asked to perform an experiment. Generate an array of whole numbers between 1 and 1000 (integers, no decimal places, use any random number function built into Java) and populate an array Perform a MergeSort, BubbleSort and either SelectionSort or InsertionSort on the array and report a. the time taken for each sorting algorithm b. how many times it has to swap an element in the array before it is finished. Perform your experiment multiple times on different sizes of your array. Provide an opinion on why there are differing results and whether you believe the results are what you would expect. (hint: choose array sizes to structure your tests)

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!