You are on page 1of 6

Practta

M.M.I.T
e No:
Page No: Date:

Assigoment - BG
Bc

nobleco stetment Beginning oitt npty bnary secch


binany Seorch tree by
tree, Constuct
inseding the vae io the xdex gNeA Alt
constcinga hioomy tree
Tosert neo node
And no
God of node in Longest pat
Miaimum dada value foundinthe te
iv, charge a tree so tHat the oles of the left and nght
pointas Dade
SeorCh a vdlue.

To Understand th bos2 concept of Nonineax


Data stche TYee n and iS babosi2 opexahbn in
ata shru ch.
Outone
inplemen the bas| concpt of Biray
Searth ree to storr AHso
basz portn m
Dper aho o inset Delete a
adearhTansrese
Data stotun

Sotoant and Haxduty Reguseeok


. Gu-biks Oper Souree inux
Opensouce Ott
prgamm
M.M.I.T
|Page No: Date:

Theony
Concept in bdef
xee repre sents te nodes Conneted by edge Boaxy.
Tore:is Specic delto
Shichine wyed by data Soxgs
purpAe A hioa tree hos Specia Conhbrn
thit eacode can hant
ha
CLildhcenA binay tree has te beneAts of both
odeed anay nked at a 3eanch
qck Sonteal aay and inserbbA
deletbn opesahbn.
Bioary Sear th Lce Repegentahen.
Binany geartk tree eshihts a speoial behouey Apade's
let child mut have
Value an the Dde's nqht chld ms bax
Value ce ates than s panent Value.

t nodey Bollao the helo mebunel


propeahy
he l t Sub- tree of o oode has a key tess than
equad to its pencat nocle's Key
The mt gub-tee oP ocde hasa key qreaty than
pantnt ode's key
M.M.I.T
Page No 2 Date:

ST divdes all
Thus,85T uh-treey inh huo 3emetss
the Sub-hee anc th m sub-hee anc
he deAaco

lePtsubbee (keys) s hode (key<mgstsuh tree l keyg


ree Node

Aollooing shuchuot is uwed Anx Node Crtako

3tnct Node

it data,
stouch node * lecbiol
Shuct node * viqht thid'

BST Bas DperatDns.

The basie Operahoos that can he perfisrmed


Seacth tree daBo shuctoc
M.M.I.T
Page No: Date:

Tasert- Tnsext an elemert in


tree ont ate a he
6
Seaxth Searhes
Way ko
TedgxÇx inovdex
pac prdea postorde,

paren comes beor childoen overall ot


ist Bost -ordey i LeH Rgt, Ro0t
paNert omey ate
ChilcheoovexaL
OVexas/ oot las
En- Orde! Le, pootRigkE

Agonth
T ot is NuLL
then cYate boo Dode

Compat te data twtt podesdocto


Whle Untl inse, Horn
dote 3 qYeater than ode. data
else
gito Jesubtree
M.M.I.T
Page No: (3)Date:

geanrth operabon

Algoithm
qoot date 13 eguaj to seorth doata

else

TA dote 3 yeater th as pocle


ode. datg

else
qo to e Pr sihtee.

dete und
retuyn ngde
eodutle
BS T.
Deleing a

ase ) delete cnode th 2e Cbld -

else set paxent (onght oll.


Case 2 delele a node oth

Rale parert (n) to hid of


delete node oith 2chlden
peplaee inor dey gucceray o klele n0de posihbn.
M.M.I.T
Page No: Date:

Conclu sbrn Lanlyss:


able to implemeet Bina gearch bre and
Opexatn în Date stuctue

You might also like