0% found this document useful (0 votes)
13 views

DS Problem Solutions

Uploaded by

ficis10135
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

DS Problem Solutions

Uploaded by

ficis10135
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Ans:

step 3)
Design
skep1)
&teps)
Agaiseletn Step No
4) (m,i) tep)
T,1 of
SHTRA
AHARA
inimumSeleet thei
(s,i)Arrange M=
waite
T=1R2
S1 A
=4 tHuffom
Tnee
T19S, freguen
S,2
reamanga any syubol
( (T, te
amd
two 1)(H, symbol's Y
cieg
Jaw its
symaothe sy 2) thefor
mbols in
(R,), frequeney
as
tnee.
freues
whose o
toee (A,4) ceningrder wd

ohscefre4.
A,
te.
whoee
symbols
Sy
mbo|
tree
a
su
lut A4 A4
i a
steps rsymbl (n:, (H2
3)
(TMs,
above anymumn
in
considere
fs T,) (TMS,3
the
2) Selet
Repeat R,
Rearrnge
(1,2)
)step 7)step 8)
step
tep 1) TMSHR,7)

TMS,

(4t,2

Step 1) A4
(HHR,4
oms 2

stpi) ATMS HR,1


Huffmean Codes

A =0
A,4 TM sHR,)

(Ms,3 HR,4)
ms,2

Hu ffman ee
2)
Desgn Binary Search ee for the foll wing
elements:

[O0, 7O, 20 40, fo, 50 6o, 30, 3


Ane; ot nade

Taeert0

Torert 50
Iaset (o
Lofet 30

190

t9: Binary serh.


Con stuct Binary
following trarensal .
H +E E I AF TC G
A
fostoes: B

Ans node fhm postyde,


step) Find ot node

chH from inoder


eft an ight
Step 2) Now find
A

(DBHE I) (FIca)
steps fi| fas t nie is
Step2) Repeat abme
Congidered.

DBHET

nade and its


Step 4+)
alreaty plae.
Step 5) wet rnt is

Srep ) aent oot is 3 plaed


step 7) ert t is B.

HET

Step g) gtt

(H

Rirery ee nodey "f plaed


all

ropery,

You might also like