Select all the statements below which are TRUE. Consider a decision tree T with
ID: 3722627 • Letter: S
Question
Select all the statements below which are TRUE.
Consider a decision tree T with height h = 3 corresponding to comparison sort of n elements. Then the number of leaves can be 9.
Let A[1..n] be a max-heap. Then the first order statistic is A[1].
Let A[1..n] be a max-heap. Then the minimum value in the heap is in the subarray A[PARENT(n)+1 … n].
Quick sort runs very fast in practice.
If f(n) = (g(n)), then f(n) = (g(n)).
Counting sort is stable.
Consider a decision tree T with height h = 3 corresponding to comparison sort of n elements. Then the number of leaves can be 9.
Explanation / Answer
FALSE [A] [it can varry]A binary tree of height h has at most 2^h leaves.
h = 3 leaves => 2^3 = 8
TRUE [B] First order static is A[1]
TRUE [C] subarray A[parent(n)+1...n]
FALSE [D] It depends upon things .
FALSE [E]
TRUE [F] Counting sort [ based on keys between a specific range and stable sort i.e., multiple keys with the same value are placed in the sorted array in the same order that they appear in the input array.]
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.