Btech Cs 3 Sem Data Structures rcs305 2019
Btech Cs 3 Sem Data Structures rcs305 2019
B. TECH.
(SEM III) THEORY EXAMINATION 2018-19
DATA STRUCTURES
Time: 3 Hours Total Marks: 70
Note: 1. Attempt all Sections. If require any missing data; then choose suitably.
SECTION A
SECTION B
b. Consider the following infix expression and convert into reverse polish
notation using stack. A + (B * C – (D / E ^ F) * H)
c. Explain Huffman algorithm. Construct Huffman tree for MAHARASHTRA
with its optimal code.
d. What is a height balanced Tree? Why height balancing of Tree is required?
Create an AVL Tree for the following elements: a, z, b, y, c, x, d, w, e, v, f
e. Write the Floyd Warshall algorithm to compute the all pair shortest path. Apply
the algorithm on following graph:
SECTION C
3. Attempt any one part of the following: 7x1=7
(a) Write a program in c to delete a specific element in single linked list. Double
linked list takes more space than single linked list for storing one extra address.
Under what condition, could a double linked list more beneficial than single
linked list.
(b) Suppose multidimensional arrays P and Q are declared as P (-2: 2, 2: 22) and
Q (1: 8, -5: 5, -10: 5) stored in column major order
(i) Find the length of each dimension of P and Q
(ii) The number of elements in P and Q
(iii) Assuming Base address (Q) = 400, W=4, Find the effective indices E1,
E2, E3 and address of the element Q [3, 3, 3].
(b) Explain in detail about the graph traversal techniques with suitable examples.