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

Answer True or False to the following problems. Quick sort should NOT be used wh

ID: 3693687 • Letter: A

Question

Answer True or False to the following problems. Quick sort should NOT be used when the data is almost sorted. Quick sort is always quick. Merge sort requires extra space. Selection sort recognizes if the values are already sorted. Binary searching is always faster than linear searching. HeapSort is inherently unstable. (12%) Show the contents of the array After each of the first two iterations of Selection Sort Bubble Sort Insertion Sort (8ft) (I) Show how the values in the array in Problem 2 would have to be rearranged to satisfy the heap property.

Explanation / Answer

1) 1.true
2.false
3.true
4.false
5.true
6. true

2)

selection sort

Bubble sort

Insertion sort

3)arrangement of an array satisfying heap property.

the above is the arrangement satisfying the max heap condition.

first element in the array is root node(or parent). the heap property is parent shuld be always greater than its children.

Arrangement of elements:

i=0 root,i+1=1,i+2=2:root's children

similarly for if every parent is i then its children would be i+1 and i+2.

for further queries kindly get back

43 7 10 23 18 4 19 5
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote