in Algorithms
504 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.
in Algorithms
by
504 views

1 Answer

1 vote
1 vote
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.
by

1 comment

@Arjun Sir need your help in making it more formal. Should I use induction?
0
0

Related questions