Paper G Data Structure 23-12-24
Paper G Data Structure 23-12-24
Question 1 [10]
A) What is Stack? Give an real life example for stacking
Question 2 [10]
A) Convert the following Infix expression to Postfix Expression. Show Table
(A+B*C) ^ (A%B+C*D) ^ (A+B*C^D)
Question 3 [25]
A) Write an algorithm to add an element in a dynamic stack
C) Write an algorithm to traverse a doubly link list in reversed order. Assume TAIL
pointer is pointing to the last node of the doubly link list
Question 4 [25]
A) Write a function to insert a element in link list. Assume addAtBegin(int) and
addAtEnd(int) functions already exist to call
E) Write a function to remove the first element from a double link list.
Question 5 [30]
A) Draw a stack representation of the following
a. Push the numbers 10,20,30
b. Pop an element
c. Display the count of the stack
d. Push the numbers 25, 30
e. Display the peak