# 2010 Question Paper,DATA STRUCTURES AND ALGORITHMS,University Of Pune Question Paper,P. G. D. C. A. (Semester - IV)

University Of Pune Question Paper
P. G. D. C. A. (Semester - IV) Examination - 2010
DATA STRUCTURES AND ALGORITHMS
(New 2008 Pattern)
Time : 3 Hours] [Max. Marks : 70
Instructions :
(1) Attempt any seven questions.
(2) Figures on the right are full marks.
(3) Answer all sub-questions of a question at one place.
(5) Use ANSI ‘C’ language in your codes.
Q.1) Consider a 2-D array, A, of 25 rows and 15 columns. Compute address
of member A (15, 10) of this array by both row major and column
major methods. Assume that each value of this array consumes 2 bytes
of computer’s storage and base address of the array as 100.
Show all steps of your calculations. [10]
Q.2) (A) Convert the following infix form to its prefix form :
A * (B + C) / D - E
Show contents of both the stacks at each step in a tabular
form. [05]
(B) Evaluate the following posfix form :
ABC + * D/Ewhere
A = 1, B = 2, C = 3, D = 4, E = 5.
Show contents of stack at each step in a tabular form. [05]
Q.3) (A) Write a function to add an element in a linear queue of characters
implemented as a linked list. [05]
(B) Write a function to push an element into a stack of characters
implemented as an array. [05]
Q.4) (A) Write a function to insert a node in a linear single linked list
of integers. [05]
(B) Write a function that prints contents of a doubly linked list
of integers. [05]
Q.5) (A) Write a function which accepts address of Head node of a
Circular Double Linked List as a parameter and prints number
of nodes in it. [05]
(B) Explain concept of Generalized List (GList). [05]
Q.6) (A) Write a function to create a copy of binary search tree. [05]
(B) Write a function that counts number of leaf nodes in a binary
search tree. [05]
Q.7) Construct an AVL tree for the following data : [10]
TWENTY, SIXTY, FORTY, FIFTY, THIRTY, EIGHTY, SEVENTY,
NINETY
Q.8) Consider message “MANAGEMENT” and draw HUFFMAN’s tree. [10]