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

Please this is C programming, the answers are provided there, someone that knows

ID: 3816720 • Letter: P

Question

Please this is C programming, the answers are provided there, someone that knows which one is the right answer for question 12 and 13?

Question 12 Median-of-three partitioning is a way of choosing the Selected Answer: None Given] merge point Answers pivot sublist partition Question 13 The following describes what algorithm? Scan through an unsorted array and move the i smallest value into the i index in a sorted array. th Selected Answer: None Given] Selection Sort Answers Bubble Sort Insertion Sort Merge Sort

Explanation / Answer

12. median-of-three partitioning is a way of choosing the Pivot.
- Ideally, the pivot should be the median of input array s
median = element in the middle of the sorted sequence
- would divide the input into two almost equal partition.
- unfortunately,its hard to calculate median quickly,without sorting first.
- Pivot = median of the left-most,right-most and center element of the array.


13. scan through an unsorted array and move the ith smallest value into the
ith index in a sorted array is Selection sort.
As The selection sort algorithm sorts an array by repeatedly finding the minimum element (considering ascending order) from unsorted part and putting it at the beginning.