Paper I Subject Code: 50923 i Data Structurs
StLcoHp) l'R*tq I esohA,t->u-l s4*2-3 | ca* tt - 2 S
Itn*--ffi
Duration:3 Hours Total Marks: 80
N.B: (1) Question No. I is compulsory. AP Ck De : gq t8E
(2) Attempt any three questions out of the remaining five questions.
(3) Figures to the right indicate full marks.
(,1) Make suitable assumptions wherever necessary with proper justifications.
Q.r A) Define ADT with an exanrpie. L0sl
B) Evaluate the postfix expression rtg4+2fi*-" using stack ADT Shorv fhe i05l
process stepwisc.
r-) justify the staternent wrth surtable example: "Circular queue overcontes the i0s l
disadr,antage of linear queue".
D) Differentiate betr,veen linear search and binary search. t0sl
L A) Construct Fiuffinan tree and determine the code for each sirmbol in the il01
Q.2
strin g "BCAAIIDDCICACr\CAC''.
B) Discr"iss the cases of deletrng a node fi'om Binary Search Tree wrth surtable i r0l
example.
Q.3. A,) Write a prograrn in C to rmplement queLre ADT using linked list. I l0l
B) Construct ari AVL tree by inserting the follow'ing elements in the given ir0 j
orcler Apply necessary rotations wherever required.
54, 12,24, 68, 85, 99, 42.27.87, 80
Q.4 .{) Write Cl tunction for tsFS graph traversal. Show the stepwrse BFS traversal [ 0]
w,ith the help of data structures for the lollowing graph:
:: B) Write functrons in C to perform the followrng operations on the Doubly | 01
Linked List:
i) Delete a node after given node.
ii) Find node wrth smailest data value.
iii) Display the hst.
iv) insert a node at tire end of the iist.
Q.5. .{) Build a Binary Search Tree, grven the fotlowing sequences: [05]
Inorder'" 35. 41. 48. 52, 57, ,-2^ 79, 85, 86, 90
Preorder: 57, 41, 35. 52, 48, 90, 72,85,79, 86
B) What is topoiogical sorr? Explain Topological Sorling with an example, l0sl
, 39186 Page 1 of 2
DEE0 l 27 i.'084DC6022DF2 At AD222r S9Z4
ztt+1o
Paper / Subject Code: 50923 lData Structure
C) Wira.t ;s coliision'/ Using linear probing, insert the following values in the t10]
hash table of size 1l & count the no. of collisions:
83. 53, 64. 25, 39, 96, 12,7 l.
Q.6. A) Writc short note on Priority Queue, t05]
r]) Write a function in C to count the number of nodes in Singly Linked List. [05]
c) Create a B-tree of order 3 by inserting 8?,94,59,98,63,7,27. [10]
85 t02
JL 59 92 105 120
* +* rlc **** C< ** * {< {. * {<*.* r. * + {, * * **
39186 Page 2 of 2
DtrE0 1 27 F084 DC60 22DFZ0 t ADZZZF 9921t