Question: By using these sequence s, u, b, d, e, r, m, a, t, o, g, l, y, p, h, I, c , sort the numbers
By using these sequence s, u, b, d, e, r, m, a, t, o, g, l, y, p, h, I, c, sort the numbers in ascending order by using the following techniques.
i) Insertion Sort. Also, calculate the total number of comparisons have done for the sorting.
ii) Selection Sort based on the largest value. Also, calculate the total number of swaps have done for the sorting.
iii) Shell Sort (Index of separation: 3, 2, 1).
iv) Merge Sort.
v) Quick Sort (pivot is the first element).
vi) Heap Sort.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
