
DEPARTMENT OF MATHEMATICS, ANNA UNIVERSITY
MSC (CS/IT) INTEGRATED
II SEMESTER (MAY - AUGUST 2021)
XC5252 – DATA STRUCTURES
I ASSESSMENT
TIME: 1.30 HRS MARKS: 30
PART - A (5X2=10)
Answer the following
1. Differentiate linear and nonlinear data structures.
2. Given a two-dimensional array arr[4][4] which stores integer data. Determine the address
of location arr[3][2], when the value of arr is 2021.
3. The following postfix expression is evaluated using a stack ab*cde*/+. What are the top
two elements of stack after second * is evaluated? Given a=5, b=4, c=10, d=5, e=1.
4. Write an algorithm for displaying the status of Linear queue.
5. Write the processing order of the elements in Ascending and Descending Priority Queue
for the given data:
PART – B (5X4=20)
Answer any FIVE questions
6. Write an algorithm to delete a given element from an array.
7. Write an algorithm to reverse a string using stack.
8. Write a Prefix and Postfix notation for the given infix expression.
(a*b)+c/d$e/(f*e)+(a-b)
9. Convert the given infix expression into a prefix form using stack.
(a+b*c)-e$f*g
10. A Data Structure named Reverse Circular Queue((RCQ), in which insertion takes place at
front end and deletion takes place at rear end. The current status of RC Queue is shown
below:
f r
Show the status of RC Queue with front and rear pointer after performing each of the
following operations: i. insert (10), ii. Insert (11), iii. Insert (12), iv. Deletion (), v. Deletion
(), vi. Insertion (13), vii. Insertion (14), viii. Deletion ()
11. Write a recursive function to find the nth power of base b.