Data Structures Assessment: Exercises and Questions for MSC (CS/IT) Students, Exams of Data Structures and Algorithms

Stacks queues and expression. Notations to convert Infix to postfix circular queue and related algorithms.

Typology: Exams

2020/2021

Uploaded on 06/16/2021

anbu-selvi
anbu-selvi 🇮🇳

1 document

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
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:
A
B
C
D
E
F
G
H
5
1
3
4
1
3
2
7
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:
3
4
5
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.

Partial preview of the text

Download Data Structures Assessment: Exercises and Questions for MSC (CS/IT) Students and more Exams Data Structures and Algorithms in PDF only on Docsity!

DEPARTMENT OF MATHEMATICS, ANNA UNIVERSITY

MSC (CS/IT) INTEGRATED

II SEMESTER (MAY - AUGUST 2021 )

XC 5252 – 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 abcde/+. 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: A B C D E F G H 5 1 3 4 1 3 2 7 PART – B ( 5 X 4 = 2 0) 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. (ab)+c/d$e/(fe)+(a-b)
  9. Convert the given infix expression into a prefix form using stack. (a+bc)-e$fg
  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: 3 4 5 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.