Professional Documents
Culture Documents
Root ode
Cievel ) A A,C,G are ancestor of K and J
2
eveB C D
eve E
F H
^|^
leaf node
L
Root Node Jhe
The t node
R
is te
topmost
IfRENULL then it Meuns the tee is
eMpty
3.Path : A
seuence of Conseru tive edges
Path
-For exun .
The cAth om
A
totO giv en
Page No.
B.Fosts iA fozest is
of taees s
A
set of disinit epS Corfoests)
by deleling the 0ot CAMd the
Obtuined node to n9des
edges lonnecting
level nede f
seen thet
We heue cileudy
g0t of Some Sub-aee.
Date:
Page No.
B (C)
G
G
H
H
(a)
oadeed Set mo
We CUm Comuert
LSImgle node the
oode Haetree
for exaHPle
SAfa CasShous. -fooest
Eic 6 Shoug Hhe CoTeSPonding tae
4. Gib)iYq
:AlL nades
nodes that
thoyt
Jevel Cand
ce Shqe.
the ct the
SaMe the
Pasent CIeccllled Giblhins Choo thes)
Ac Camd D_
Heigh t of e
fsthe to tell
Pathfoon the zro
0t nodeto he dee pst
toee with cnly
height of L,
binaas taee ofbeight hos cit
modes
2h-notes.
This becuuse eveylevelwill hov
atleustone node and
|most2 nodes
The heisht ubioasy toee
Jeuss Jega Cn+) ad
mOst
bineg
o
Coonplete binay toee4 aPlete tree
et sutisfies tuo
PaoPeties
hinay toteyerery lael
ComPlete bincay
eyet Possiby the lustfs Comeleely fles
aPPeao
ConPlete binao
teeTa, there
2
level gf T
Can heve
MOGt 6
no4es.
F
12
binary toee
They helve been Putposety
labelled em
the
node cnd left child
gat child
the QiVen node.
ete
ge N
feamula
The
hode hn left childt
be cleule
+
ed 2k CId
child um be coaleultd
childeN
mode
nade
teulculcted
nodes
cdes
We al tnow thet in C
o
nuHbe Plcyess
dectue the ànne
9lyes SaCouPIe
MSually Hhsee Plcy e
Ce
ht the
b C
These Pluyess
euch ethe
e
2, the winnes
pluy
ad
Lwinners
e
amd lay
Wmasoeves wins declud 4euinne
n
the
Cossnsiex
given
Date:
Page No.
3
Wite down HheGtels o Comv et
Sen e) bind
with eucMPle
The following. CADe he Con vert
bmary nto ene2) toee
o
Rule : Root the bimaty
bimcty taee =
Root
of 4he toee
Rule 2: Left child of
childof the ode binady
tace mthe
Rue 3: Risht child of= node
Rizht siblna
Hhe
noden the 9enel toee.
A
B
(C) D
F) H
Com sider
k
ApAlyina the cbove Mentiened
un be Dule, the above
CoVetod
the follewig
Page 1io
Gtep 1 Mode A
toee, 50
of the biteciy
biny toee.
steP 22The Jeftoost child of he 2eot oe
will e
child left
taee alyoThese
Siblina of node thez uill
be igedchild of
tep 3: Nous
for hode Leftchild
its iht child js
cwhich
agat siblin? ene tee
Stel hi Mow
furmode C. le childof cis
its itht child
for chila of
There wille
child becuuse
ight siblna
6teP 6: Now
forodeI These
left child of 1
jn thf binuzy tee
becuuse Leff child
the has
the igt child ofI.
Step :_Mow foz node s Left child af sis
beccuse
the eneaul tace.
3The above Shos n
(I
H
Date
Page Na
ExPlain the
binay
euch Also
-
(ae 0de
Hhe follewing
lofetons Ie PefoMed
eoc h
t MOde The
1
Visitin the arot node
2. Tavesina the
he
MULL
Keleet seps 2 to h hile TREE I=
SteP
Waite TREF) 9ATA
Date:
Page No.
Gep 32 CTREE
PREO RDER LEET
Ste PREORDER_CIREE RIcHTJ
CED of LooP
5: EMD
algaoith.as
etouct Poefit
Waen
taueSe the
Poe-0des alsemth M
Poefi epresslon
Angi t-ab*cd b
AdgoithH
Step L:Re Peot
tep 2
|Step BPas To RDER (TREE S
SteD
exuMPle
Ca +
62 /Cc-)
C) b) C
AnG
Cb +Cd-/
Date.
Page No.
In- ode
taveSecL nOY-eMPy binusytoee
in-oader ythe following oPotons
Peafomed ecuo5ivey
The
clth M
by
he let Sub-ee
2. visìtind +he aoot
3. TaVesina. the it
touvesdl isulso callpd
Inthe left
olwayS
he ght Suh-tee
|hothe Dout nodesvaceegs
betueen tthe edon
let cAmd
Hhe CLS
LMRaueel
AMgorih M
SteD 2 IMORDER
|Stce
CTREESEr)
3 wite TREEDATA
IMoRDER CTREE
RIoHt)
Date:
Page No.
Ang
Waitee shct
toees
noe expzessiom
wlth exyMPle
Page No
For eŽIhple
Cxe CCa tCCblA))e)
e
a
(b
>esslon CoMpileS
Ma themcitical Softae and Com4eo
algeba Sy5tems
ankedepneserttan
Liak
Grtauct node
Struct mode
dcter
Stauct ymde
33
binay taee hsa Pomte RooT,
thich imte to the PleMent of
he RooT =
NLLthen doee
X
6
xlox X/2X
Date:
Page No.
Root
2
3
2
6
(2) 3 20 3
12
12 4
13
9 12)
3-1
CBinug toee)
16
2
C1nked nefbesedhkof Bhe)
B)seuahal
|Sequeatidl oaesendeiom of
dome Simgle
Cnedlmen slone
Date:
Page No.
taeeiS epty
2
20 35
14
35 6
2) 34
12
16
16) (18) 36 12
hs
No.
Pago
CA
StauctUoe thot
defined CA collecianof eleents
Called nades element
taee he toPmost
cclled the t euoh
he the nast 2
child>en
A mode thayt hes 2e 0childon
CeLlle& leat hode
The elenent fs Poisated
tus
hos tus
binary toee eeuaSive de
las every toee
fntion
node he
left Conteins
Evene Sub-toee
teminel nodes
enPts left
Teminalem Root nod e
evel o)
1
let SuesS0S
and at
Suaegss Sz.
12
Date:
Page No.
then Paren of
Ceall ed
Root
Q.8Explain ith AoMPle tae
Tree iven
two
these
Ghould be
taersls, thes One
n0der
be
The
sed to deteDne the left elsad
31ghtehid nodes CAmd
he Poeodes/
be u
Ged t Aete ne
be the
the nodo be
Side of
GteP2Eements the left
Hae 200t hode n-oDdestozveos
Seque ne he Guh- ttoee
the node Ginilady lements
the Side 0f the 300tnode
the uleal Seguence fo3
the
step 3
Recue ly select elementfaa
)
tavessul Seuence the
Geuence.
A
DBE FC B Fc
E E)E
clboue.
uill