526 views
0 votes
0 votes
Consider a max-heap of n distinct integers, n ≥ 4, stored in an array A[1 . . . n]. The second minimum of A is the integer that is less than all integers in A except the minimum of A. Find all possible array indices of A in which the second minimum can occur. Justify your answer.

1 Answer

1 votes
1 votes
Need help to improve the approach more formal.

In a max heap clearly the minimum will be in leaf nodes. And if we apply heap property the second minimum has to be in the 2nd last level at most if not in leaf nodes.

Related questions

0 votes
0 votes
2 answers
2
tathatj asked May 13, 2018
607 views
Let A and B be two non-empty finite subsets of ℤ, the set of all integers. Define A + B = { a + b : a ϵ A, b ϵ B }. Prove that | A + B | ≥ | A | + | B | - 1, where...
0 votes
0 votes
0 answers
3
Tesla! asked May 14, 2018
851 views
The number of common terms in the two sequence (3,7,11,...,407} and {2,9,16,...,70} isA)13 B)14C)15D)16