Visit Here Unit Wise Data Structure Questions
Visit Here Data Structure Questions
DST Unit 5 – Stack and Queue most asked questions
Topic : Stack (Key Note and Questions)
Key Note:
 Stack is a linear data structure that follows LIFO principles.
 LIFO stands for Last In First Out
 We can implement stack using linked list and array.
 Some Application of Data Structure are Infix to Postfix conversion, Infix to Prefix conversion, Postfix and prefix evaluation etc.
Questions
 Q1). What is stack? Explain with suitable example with all its application.
 Q2). Implement stack with singly linked list.
 Q3). What is push and pop operation of stack? Write the alorithm for push and pop operation.
 Q4). Write a program in c for array implementaion of stack.
 Q5). Write a program in c for linked list implementaion of stack.
 Q6). What is infix, prefix and postfix expression? Explain with example.
 Q7). Write down an algorithm to evaluate the infix expression.
 Q8). Write down an algorithm to evaluate the postfix expression.
 Q9). Write down an algorithm to evaluate the Prefix expression.
 Q10). Convert following infix expression into postfix expression A+(B*C+D)/E

Q11). Write an algorithm to convert a postfix expression into an infix expression. Consider the following arithmetic expression in postfix notation: 752+*415/
a). Find the value of the expression.
b). Find the equivalent prefix form of the above expression. 
Q12). Write an algorithm to convert Infix expression to Prefix. Convert this expression into prefix
a). (A+B)+*C(DE)^F[Infix to prefix]
c). 752+*415/[Evaluate the given postfix expression]  Q13). What is recursion? Write its principle. Explain with the help of example.
 Q14). Explain the types of recursion.
 Q15). Explain Tower of Hanoi with example.
 Q16). Write the recursive algorithm for solving the problem of Tower of Hanoi and also explain its complexity. Illustrate the solution for four disks and three pegs.
Topic : Queue (Key Note and Questions)
Key Note:
 Queue is a linear data structure that follows FIFO principles.
 FIFO stands for First In First Out.
 Queue can be implemented using Array and Linked List.
 Application of Queue is, Queue is helpful in CPU scheduling, Disk Scheduling, Handling of interrupts in realtime systems etc
Questions
 Q1). Write a note on queue. Explain its various operations.
 Q2). What is circular queue? Write a C code to insert an element in circular queue. Write all the condition for overflow.
 Q3). Write a C program to implement the array representation of circular queue.
 Q4). Explain queue and priority queue. Also write its types.