The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
0 votes
49 views
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 (385 points) | 49 views

1 Answer

0 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.
by (385 points)
0
@Arjun Sir need your help in making it more formal. Should I use induction?

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,092 questions
55,263 answers
190,799 comments
86,082 users