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