Is there any one could help me on assignment? For this assignment, we will use the following array of 16 numbers: [8 12 14 1 3 5 11 10 9 7 4 2 6 13 16 15] Answer the Multiple Choice questions below based on the progression of applying the Mergesort algorithm on this array. As usual, more than one answer can be highlighted and D is always going to be “None of the above”. When we first start Mergesort on this array, we will split it to look at 2 sub arrays. The 2 sub arrays are: [8 12 14 1 3 5 11 10] [9 7 4 2 6 13 16 15] Which of the following is true at this point of the algorithm? The two subarrays are now ready to merged and then Mergesort is called recursively on the left and right side of each sub array When the subarray [8 12 14 1 3 5 11 10] has completed its own recursive Mergesort calls, the array will look like [1 8 12 14 3 5 10 11] which will then call Merge to make [1 3 5 8 10 11 12 14] When the subarray [9 7 4 2 6 13 16 15] has completed its own recursive Mergesort calls, the array will look like [2 4 6 7 9 13 15 16] which will then call Merge to make [2 4 6 7 9 13 15 16] None of the above Now looking just at Mergesort for the subarray [8 12 14 1], this will split and call Mergesort recursively. Which of the following is true about reaching this point of the Mergesort algorithm? [8 12] will be one of the sub arrays and will result in [8 12] after merging [8] and [12] [14 1] will be the other sub array and will result in [1 14] after merging [14] and [1] When the merge is performed on these 2 subarrays, we expect it to result in the subarray [8 12 1 14] None of the above We will next look at Quicksort on the same array of 16 numbers: [8 12 14 1 3 5 11 10 9 7 4 2 6 13 16 15] Answer the Multiple Choice questions below based on the progression of applying the Quicksort algorithm on this array. When we start Quicksort on this array, we begin with partitioning it. Which of the following is true at this point of the algorithm? The selected pivot value will be 13 After partition, the array will be [8 12 14 1 3 5 11 10 9 7 4 2 6 13 15 16] The next action immediately after this partitioning is to first recursively apply Quicksort on [15 16] and then Quicksort on [8 12 14 1 3 5 11 10 9 7 4 2 6] None of the above short answer:- From the original array of [8 12 14 1 3 5 11 10 9 7 4 2 6 13 16 15], show what the entire array looks like after each time the partition function is called within the Quicksort algorithm. Indicate each time what the selected pivot value is for that partition.
Is there any one could help me on assignment?
For this assignment, we will use the following array of 16 numbers:
[8 12 14 1 3 5 11 10 9 7 4 2 6 13 16 15]
Answer the Multiple Choice questions below based on the progression of applying the Mergesort
When we first start Mergesort on this array, we will split it to look at 2 sub arrays. The 2 sub arrays are:
[8 12 14 1 3 5 11 10]
[9 7 4 2 6 13 16 15]
- Which of the following is true at this point of the algorithm?
- The two subarrays are now ready to merged and then Mergesort is called recursively on the left and right side of each sub array
- When the subarray [8 12 14 1 3 5 11 10] has completed its own recursive Mergesort calls, the array will look like [1 8 12 14 3 5 10 11] which will then call Merge to make [1 3 5 8 10 11 12 14]
- When the subarray [9 7 4 2 6 13 16 15] has completed its own recursive Mergesort calls, the array will look like [2 4 6 7 9 13 15 16] which will then call Merge to make [2 4 6 7 9 13 15 16]
- None of the above
Now looking just at Mergesort for the subarray [8 12 14 1], this will split and call Mergesort recursively.
- Which of the following is true about reaching this point of the Mergesort algorithm?
- [8 12] will be one of the sub arrays and will result in [8 12] after merging [8] and [12]
- [14 1] will be the other sub array and will result in [1 14] after merging [14] and [1]
- When the merge is performed on these 2 subarrays, we expect it to result in the subarray [8 12 1 14]
- None of the above
We will next look at Quicksort on the same array of 16 numbers:
[8 12 14 1 3 5 11 10 9 7 4 2 6 13 16 15]
Answer the Multiple Choice questions below based on the progression of applying the Quicksort algorithm on this array.
When we start Quicksort on this array, we begin with partitioning it.
- Which of the following is true at this point of the algorithm?
- The selected pivot value will be 13
- After partition, the array will be [8 12 14 1 3 5 11 10 9 7 4 2 6 13 15 16]
- The next action immediately after this partitioning is to first recursively apply Quicksort on [15 16] and then Quicksort on [8 12 14 1 3 5 11 10 9 7 4 2 6]
- None of the above
short answer:-
From the original array of [8 12 14 1 3 5 11 10 9 7 4 2 6 13 16 15], show what the entire array looks like after each time the partition function is called within the Quicksort algorithm. Indicate each time what the selected pivot value is for that partition.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps