Dsa Assignment - 2002711
Dsa Assignment - 2002711
ou o,20024 (Kog
20024)
dos cSe A2
Subje DSA
ASSgnmant-2
17 Elabotole
he doRdure for Heab Sett.
Heap Sed iS gne f the Sing algotthm Used te
oarge aa GS+ 0f elamets in odo. Heapsot algaki-thm
wotare
e era 0ftha tdea
tencepstS callad Heab te 9n this
eloments
Sotn
Stirg algorithm, we se Max Hea to ist ef
awarge in
hDecending. &tder. Qrd Min Heap te awange is+ elaments
ASceroting do
Ageeith m Heap SS olgeAthn -s odarye a Bst of elements
in asending odv a folos
Heapy
(to
HeapifY
4
Heapit
6 Exit
START
NEW
Ex pbese
Suppese the tst Sou 15 is to be addaol te -thu beyinning
bthe geamctdy us+. gborre ha TrEM 4S, TNFO TEST
aho START GEOM
NSEIRST (TESTLI NK , nEOM AvtL, TM£m)
Sine ArAL+ NUL, tontaol is tdoans-fevmedb Step 2
2Ne 9, than ArML LINR 91 lo
3 TEST 19] 45
4
LINK 9 5 TEST LINK
S* CEDM9
Exit Ali9 2
4
t8
84
18
8 100
AvAIL o 3
62
4
1 .
(S
16
15
&3) Dis Cusd tha dota Staucuwee opekatiend en Doubly
dnkeo dist
peationd en Twe cwoy LiS+
Delokion Suppese tue aagiena lecodien Lo c ef a nsde
which is + be dileleod f9m cirulo ist
N in Ust
3 Exit
tol
Mpole
anod
Inseign
oc 8 Subpeve wt dl iven the LOC
Sube)
lecatiend
aye
A
4 Exit locB
loc A
NODE B
yNDEA
NODE N x
TNSERTH NODE
heotdor toaebsal
in binary tes
algotithm fot
84) Explale an
which
he left thiloB 0f node
y
L() denotes
being Scanneo
be child.
anol R(N)
olonse he right-
-loavtrda in biray 0
7 eveob
PR preordot
R D(INfO, LEFT, RICHT, Rot algnithm
does a
Abinat
travoal
uy tea Tis in mLmoy'
dhe
openation
PROCESS to
eoch oF
hotol the
t T, an
emboaaeily
ned.An
adde efnadobkay
STAck is weol to
TEnol of Sb 2 lsoh"
6 Eit