Part 4: Merge Sort
Q7. Arrange the following arrays in ascending order using Merge sort. Show all steps.
7 11 2 9 5 14
Q8. State the number of sub-arrays for each pass.
Pass |
Split # sub-arrays |
1st |
|
2nd |
|
3rd |
|
Pass |
Merge # sub-arrays |
1st |
|
2nd |
|
3rd |
Part 5: Quick Sort
Q9. Sort the following unordered list using quicksort. Assume that the pivot you use is always the lastelement. Show all steps.
7 11 2 9 5 14
Cross Over => swap pivot with?
Swap with Low (pivot last element)
Swap with High (pivot first element)
Get Answers For Free
Most questions answered within 1 hours.