UNIT-4-
ar ti — steal ike
ee eueecaln, tuaverse In fon ax
ary [Finke Sis enhanas ‘ie red mA
ying / y to Proverse in Bath She lid
backward .
dinked tat fest hn ps yedes 0}
poe thee ‘pd sd node e
= Bud in nit Het re hel, i 0
9 Jaom anode ues any dbsixod neal ned .
sue wer alana dha Hog hil! in + Faayersing |
“yuaviding the data ae Tito wht ore
Td node 48 « Je aed Dit quith sovaak othe
Hen wa can Lane ump frome one no
other no
&
i Tun 15 a data phuuctuse fn auc one node
a 76 cooneckol wth Bevaal nodes and in fu
hose scveral aie Qu connected wurth weveral —
@ o fhe 10 —
sua dé dada shud 146 a Aieraxchical Shuchuo,
Hot = pacd to sosvooert and, oxgarze data in
) thal is easy fo navy vate C pad “CCA
“gis a he Tak a “la connocte
an on oY hivmch anohy}
beter the ‘ aisecrery at Ep) Sac ae Sec 2D -
ee et) «eee 22 Sec 22:2 -
el Zidvarlages 9} Boe
» Jucts toflect studwal swlahonships tn Leluteen Ei
the _saconds of dota.
Hiviasichies con be seeueesented bs a
- Insedion and poate can a bln by 3
in
Goats ase very q_loxible dala él duro, palates fe
Uo move sublBeew axound sith minimum off ors.
lever oO @— Poot Node:
Bosic Temminoleg y tt
7. — K Ne edge
level I wie 7te)_\ D
W2>@) € © ® |
o-Node 2 Grey Chment an he fue i called |
node tuhich contains data and finks 40 @f/
es abe ve digs ABC D,E,F Gt 11k all ose
2: Boot i ghes “ao “pihich 6 2 faced at the
The fue £6 called 05 Kook! nook
=| Eh fue fas only one Kook aie —_
eg (A)
Fea noha = Thy tow noobs salich dass of
eg, 7 “child nals a PE mn Jen
= eq O60n, DTK
a A oe :- Ho fatal numb child 1 ala
+ ay frat node is Peal ox pu of that
eg, Be of Bis S _
CT Odgeee of A iS 02. o
| oi —
5. Degree ~~ Aegsae of hue to the
oS te je “in oid toad thal bog ee
Jeg 1S =
6. Level of o node +— The ane of node #6
wepuosented by Fhe Foul
~ Drs tovel Heat, no! eC toad
i it af chi child ae be one and
olshs ley
a She pe any hode £6 one moxe £#han Te
— fai a
= a = ==
a cot : ae -
DEF Gy = 2 - So
rok -S es- Than ae 1 eu af
fod ae oe 5 calle
]
J depth. OH
doe i- Fhe cannechng dink bel 4
—_ = Che wea] 7 0np t two
[Of tna Fran Shore axe A - number of | cae
hon #how awl be n-1 number vy nodes
4
4
—janethox 6 called ‘as
#wo no
(Foth blw fond => 7A-B-E-T
(Fath blw Candk => C-G-k
~ Pasarl:— The node which tgs ehild node
| Path :- Sequence edges from @ne node fo
74 ‘as flath Gere Those,
We callid as paurk- Svs node 1s bodeeuon
of other node
nodes +
Veg =H BE, GG.
4 Child :- She cade whreh hos a Link from
4 fs fos ris node t6 Known a ehild node.
- hia node {6 Sucessorw oY oth nodes.
‘piblings = dha nodes tuhich Zell
ong to éare
) Bec
anak we Known ar biblin
i DEF) Got
Gn sz.
poxnt, node
bub trac af
land gub- tuo
sgt ub- Hoe,
by
%
ond sight Sub fie :-oJn 0 fiue, evey cWld »
Tom a no forms a “ub Ble aucupsively
Vevay child ode wilt form a eublnan ‘Ls
Tt eido 16 colled as Leff Sub-Tee 7
—sught sida 26 called Oo
gbt Genval gue —
_& Binoy Ise
3. Bin _Seauch J Tue.
Geral Juse i-
| The Gina Suoe it tho Loco iq
‘wuluch all the nodesJcan fave ang numbex of ¢ chy tild
nade” wuithedt 0 an geosturchon.
Age
ial free T Us a finite =e af ona Ox mone rat
there £& one dosigi nae pared x, called #2,
Samora nodes ase presditions
pubss “1,12, ---Tdy each of
76a Bue, and uthose soats 91 2.9m
ee
“Binoxy Jueo: -
2 x “A tue ain ah zy node
can hove maou'mam of. foo chrld rodesJ ss known
as Béinasi yet
ts a apecioliy. ed; foun Sece data.
Nase
a di rctublo_ én ale ot bay de vs allduod to
“chuld rioces
at Tas of o ay =
Blut cAl Binns
Comp Seed ane oe. 7 oa)
lenge Compe Grey Toe
7b Kewed fue a ——___
ertinded Binns mec~Juog :-
say inte, — A big a én “ulaeh
“node has ofthe fac 0% 3¥10 number ree
11 called sadly Bi Bina HOO»
{£5 also known 047 Full wd “Pua Ot
{Pees Binas sy Joe OK 9-900 ()
| a
oe. | Complete. Bi Suee 2 :
- sas a binary Seco tn anhich |
_ eve jntonal no tag 3 duro child todas
and? alt the tea/
—Jealled Complete
3: ‘gilmost Comte Binary Juec - a
Ol benany Tnee with
L fevels, _ hoving all Lovely 4 tim to L-| =} comy pletely
Hed ewrfho oa ges and Lael Level L iS
Mastially filled Jedi #0 sight 6 brown as
Almost © Cle Binaey ae een
A4 Bhewed Binoy
ef only Jef
gui he Ioabached
nos 300 In
ana cog ox onl
pssent th fe called —
S25 adindid Binary Juco a 4 oe wal
fi “
: = Te (es Uae fh
Rea) bysae ding lame nedes 4 fo a bi piey i
‘ ey ne ts ts tall Bénoy eee —K Repeasedation @) Bunny Guo
1 Bequntal Repussentation
= es a os OH
Ec a Sequeserdahor bin Tae te Sopreserted
— nuehnce én ramos rth the Fol pap
ely bay a ened [enili ayo y Com paige ae ot
[most
i oy Yalu ta at
[Mortman giz¢ oo] 46 Teel 0% He fin
eee AUCH EOL Be é Mg.
a P| Gu 6
eae aoa => [cere Iu} oje[ols|elt]
Fae (R) resihen}ol|i [2 [olulsley -
6B |
=
oO
7
oll
°
P
|| : 4
| ® 7
I \ Elemont B D F
| i Position 1 aly 6
Sh =
na) Oe
|_| (@) )
———
paw I
G. | Wrtke advantage, falisadvanta a
*sepicenlabe Fp iy ele of aaa
a {tHimplemented eutth tho holp inked
info pid and eh ontene .
io pad
plaadata’ +, ———
4 | ined Cola veh ceCoxwato an em slack S. ae
Initialize ¢ node as soo,
———S~_Pash the cwwoonk node t S and sf _—
| cussunt = cussent— (eft waht cuswont is NULL.
—— 42 Yf cuwurd e6 noid and slack £2 vot empky then
A pop an tlm fom stack
Sprint the popped ¢lem, eet
cusoent = popped item sigh a
——____© Go » step& : _
S. Jf cwoond s6 Nut and Stock ©& emphy thon
dae done. [2. Pue-onden Traversal: 7
In Phis pare: the
soot se visiled fisct thon lef! pubhee in,
__poterdr and te a nb bu bho fn puecnchy
~ —Pacode. Ce) wily soe
—- Visit tho wood -
= Taavense Sho Loft subloce of node én powder. 7
= Juavense #he age fublixce oe node sn potorclor .
OR
» blot free. aork Ps Psird A
& Gro fo deft bub- Tene a8 chopen 0% = panible
# “while visiting each node, yoant IF.
4. Goup to J odd. [SSnnnnn
a - “Joke backrack.
6. Go fo su Sgt 4ub- tooo “possible.
id
ack
as coop o%
4. hile vs i “each node junk 1
8. Jake backhs a
— =e = nolL) Bee See
~ couk nook node
i to sack —
i 2 Mo follouing while stack 14 nod emphy
teas gy et) anced HE
chil
on ¥ d item _—
é ae ee child of of pleted filam fo éfack .
{i
|
Iw| WM)
~ 3: Poot - onder. Juaversol —
cam) 7 Gn this tnoversol, tho Soff :
bubbao ip visiled finest, #hen tho st ne Buble
Tand ¢hon the xook. : ¢ :
i
7 _ | Poslondan LRv) algasithm a
r duavese the soal's Tet hi d( subbiee) of nook
‘node £N nosleodon . a
2.\ Traverse tho soolls sigh child (subhbue in poster den,
& Visit tho goof node : _ a
| OR a
(élad {rom oot.
. Goto dept bub- fue ad door os possible
Go up Jeaf node, pont it .
Tate backtrack . i
‘Go 4 aight Aub-taae as dloper as possible
“tohon ch $0 leaf node, punk it.
Joke acktaack .
Podad nroda while savici ag
— — {acid —posiondn ste node sep) ——— >
(iS (pl = Nu) ;
| ¢
— postostlen ( pleftehild) a
Ee felon wiqhichildy
1 4
DEN JOY 1Q Le | yo —
| Couk<< p= dodo, I =
Tlelse — — — _ i i : |
eluen_, = : - - |oe
i
~~ Durolive Jee Pastordin th a
SS
Rich soot fe fst Alock
ee e fist _otock io “nol_empby—
a Rope “no eae eine | push —
o it bo _secand —Stac
ne 8 Ras def t_and_ augit it chilehon nog he “poPP
——_|__node ft Afissl_si
3 Paint contents of second tack ——