Professional Documents
Culture Documents
AOA Assignment 2
AOA Assignment 2
SHI BHIRAJ. V
TaTTQEVECITO
ECE - C
bond Sahatis
heap pupasty ap
geater fhan or
han
maintaio
VA
Biray Min- Hsep:
binng max- hea p, Hhe
hode
hild
eleen
at Hhe
min-heap,
the vahe each paant
than to Hae Valmes
cluild nodes enyws
iaim elennont alway at the ot
Heap V3
odinony Binany Toe
Suchu: A Conmplole biy
al) levels exapt
the last Jally siled .and
tat Hlled
Contast n
hae
|/ and no ules
hod placmnt
|Opertions leaps
e clenent maing them
m
mahatly CompaMe acivihu.
gamic
the
pprod,
iovolues sle dig Hhe
adivihy
eaulist Hioiah a encd
ard often yidd
ophimal slaio tox the activiy Seleti
-
|anamie
Can
Pgarmmgi prgeainiy
achviky sele tioo
al Pesible
eutsehs ativibs Howeve it ay
nat be ztüent
Jor this
Imptane
ines
aloes fos
achvies
ith
achviy that fioises eariest, it be cones
eas ie
detesine actihe
Can be peo fonneJ
Appicátino
Htatonan is widdy wed in
data Coupresleo duch as in
age and
stor aqe to
preent data
7asigning vaiable
Codes
-lngio chara cteu based on
pomalhng
algus?ltinus
elenents
heap[moxtrdex])
3
broat)
Þublic :
Veid iut Cint valuelr
Weop push back vale);
heapijyOp(heap *iz)-):
0at deleleMax ()
HChap.enplyt
Cout e"prienty queu is ermpty ku!
to mar Vae
tuopsJ:
heaploj haap bt):
heap pop -back)
hapity pDoun (os
Tehun mar Vaue
3
aondt
3
3
Nehun
taplo].
any
Void dijxatha (recor voopa'ntid int s
Sosce)
int
Vechx it dit (n, IvT MAx);
20)
int
weiglt cdge secod
Compl etion
Rescuce Al}location: Te Sstern helps in
dor
Coutenl