Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Q.1. Sort A = [ 13, 6, 30, 1, 5, 9, 12, 6, 5, 3, 5, 17] using quicksort with med

ID: 3738271 • Letter: Q

Question

Q.1. Sort A = [ 13, 6, 30, 1, 5, 9, 12, 6, 5, 3, 5, 17] using quicksort with median-of-three partitioning and a cutoff of 3. For this question, you need to illustrate the step by step solution of the quick sort algorithm. Please strictly follow the steps of the partitioning and quick sort algorithm.

Q.2. Sort array A = [ 13, 6, 30, 1, 5, 9, 12, 6, 5, 3, 5,17] using merge sort and illustrate your recursion calls

Q.3. Sort the array A = [ 3, 1, 4, 1, 5, 9, 2, 6, 5] using insertion sort and illustrate your solution

Explanation / Answer

As per the chegg policy, please post one question per post.

I have answerd Q3.

please repost other in separare post.

Pelase rate my answer if it helped you!!

[3, 1, 4, 1, 5, 9, 2, 6, 5]


Pass 1 -> Inserting : 1
[1, 3, 4, 1, 5, 9, 2, 6, 5]

Pass 2 -> Inserting : 4
[1, 3, 4, 1, 5, 9, 2, 6, 5]

Pass 3 -> Inserting : 1
[1, 1, 3, 4, 5, 9, 2, 6, 5]

Pass 4 -> Inserting : 5
[1, 1, 3, 4, 5, 9, 2, 6, 5]

Pass 5 -> Inserting : 9
[1, 1, 3, 4, 5, 9, 2, 6, 5]

Pass 6 -> Inserting : 2
[1, 1, 2, 3, 4, 5, 9, 6, 5]

Pass 7 -> Inserting : 6
[1, 1, 2, 3, 4, 5, 6, 9, 5]

Pass 8 -> Inserting : 5
[1, 1, 2, 3, 4, 5, 5, 6, 9]   <= Sorted