0% found this document useful (0 votes)
16 views7 pages

011 Tree ?

Document of handwritten notestreer

Uploaded by

zufishaali2003
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views7 pages

011 Tree ?

Document of handwritten notestreer

Uploaded by

zufishaali2003
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

foees Date 4 8|22/|

Page No.

Toe _ Von-inean data Stmn Chue


Troe

OTenean Fonests Pina


Toee imamA FxpnesSion
To Seonch Te
The

(10)

Koot Node >topmostUcda


Leaf Node. bottom mos Node
SUb tee
Pownt modo - Amcesto Node'
LeNel Potn-
oeaModo Class

Tdaa
vectora Toee Nodo T> > Childen,

vectoaS
Ve Cto Symlo to
on' dekeminhe
Ehe Si2
vecton Ldaa-ty pe> vetton nam
pUsh-bach
POp-oa ck
im sera
Size
Coumch
Tq ke lnput ap a Tael Leel u se'3

Then ull oe quew


2) At Sire st take rao0t md pwsh into t
uen
3 TN Pop) on l o one OlLmen amd
accovadmG
t o tho eleml We
Com t o e thei Cwld ancd pUsh
+he queul

whInqueul empr
Prro COsS emd,

2 Prm t Data o OToeo euel tuse


AlSO b Usim9 ueue
2) PoP one ne elemernt(Uoce) drooy)
he qveue omd Prim+heivo cl
)nd pusn t h culd Oo de an
to
qveue ol so
Jn 4isS
NO Ne Cam Pin Lvelise,
Date
Page No.

3 Count NOdles_im a Tea


ans 1
fovr
ams += necwt Sive Coull: >

netUm ams,

SUm 0f Nodes im aTpee,


SUm O
for C 2
Sum t= netUTSi Ve
SUm t= noo t > doa
peFUm SUm_
5. Max dta Vodoim aToeQ

NOde emp =d
for
NOde t= eUTSive Col And An
& Ct doata> temp. d onta)

+emP t
(oo.do a > temp . doata
i&
petum root

2Ase o turm emp

Fimd height f a TRee


Jnt may 0
fon ( oCLUT $ o n Coll dind.
h ollo

hebtyr mA
Cholb> ma) m a t hette
Page No.

8. Depth of a Modo (Pmn NodeS odE

Co Ut 2LYO00 - dota

forr
Recwrsiom - - , K-1)

Coumt Leaf Nodes o Troe0>


oUnt =0
o 0 . eildnen.Sie 0D)
CoUm tt

Coumt += r e CuT Sive Cout


e Fum Cout

Post+ Otoden Toave Sou


Visit Chid Nodo FioSt
Te odtWodo
forr C
Pewcive Cou
CoUE Cerootdot

Cont Contoins. Tm.

Corum fonn-e

bool e p pecuuiv CbuS


p = tgn)
Com- mL
i_o0> dentne )
etuAN- Comn
Date
Page No.

12. COouD Nodos_ ap NodeS

Crunt

t +mps neaunive ConA


Co tevP,

oo dA
Cen t
Cent

3 NOd AAA maximm Chld Sam.-


Inee Nodo Lint> om= vooot
c o > deta
&ov ild) ?
O OuU Chig

Cnl giz)
To-e Nod t = Re Cstive cctt.
n 2Svm 2doste

fo nt
SUmAt

6 ( Sym Sum)

Troee Ngd e
Cns,
Tdei C o l
1 Shanctunon

ven TWOTwee

MOutC th _ aR
jdomt Ceu CA NOt.
+ doAta
omporca both aco
C Anst
otun olpe
(2 COmone ocot Childo@mze and
oo Cu doev Si2e.

Cr
(
BtUTONRouve tort

peUron

15 Next Laagen Nodo aivem o kD CduR)


fnd Next ouen Nodo UoluW_
Tats de max
i roo detoym)

or
Toe Node pecursi vR
id NUL) ontil
ese ( doda>noaddok?
m O x d o i t
ova

16 Seomd Lagel Element_

we Com' Hve o F no
Oune to tue ma
SO mok e loSS mo ormd
S most Ttemode i l l held,

TheD d out 4nswaa


oape

t)CeildD
Re austve Cou
T CnNd,mota >an ms doda)
i&Child.3m
7ans- S ans.
C NOL am.m= ld M

6. Rep touco depth


ReplacQ CL dept valuQ
o d e . CoR).

0ot data
depth.
f C
helpt deptht
peut Sve Cbt

ThS

You might also like