Skip to study material

DATA STRUCTURES

Unit IV · Stacks and Queues

AR25I Year · II SemesterCSE(AIML)25CS12001

Clear answers, algorithms and worked examples for the current syllabus.

11 topics11 two-mark questions11 five-mark questionsSeparate viva questions

22 questions

Open complete unit for printing / PDF

Questions and answers

  1. 01What is the stack access rule?2 marks
  2. 02Explain the stack ADT and array-based push, pop and peek.5 marks
  3. 03Where should a singly linked stack keep its top?2 marks
  4. 04Explain a stack implemented using a singly linked list.5 marks
  5. 05What is the final peek after the supplied eight operations?2 marks
  6. 06Trace the supplied sequence of stack operations and find the final peek.5 marks
  7. 07Why are operators temporarily stored during infix conversion?2 marks
  8. 08Explain infix-to-postfix conversion using a stack with worked expressions.5 marks
  9. 09In postfix evaluation, which popped value is the right operand?2 marks
  10. 10Explain postfix evaluation using a stack with the supplied numerical expression.5 marks
  11. 11What must match a closing bracket?2 marks
  12. 12Explain balancing parentheses, brackets and braces using a stack.5 marks
  13. 13What is an expression tree?2 marks
  14. 14Explain expression trees, construction from postfix and traversals.5 marks
  15. 15What is a queue’s removal rule?2 marks
  16. 16Explain the queue ADT, operations, overflow, underflow and applications.5 marks
  17. 17How does a count-based circular queue distinguish full from empty?2 marks
  18. 18Explain a circular array queue with full and empty conditions.5 marks
  19. 19Why maintain both front and rear for a linked queue?2 marks
  20. 20Explain a queue implemented using a singly linked list.5 marks
  21. 21Distinguish a stack and a queue.2 marks
  22. 22Compare stacks and queues and explain a queue implemented using two stacks.5 marks

The 2- and 5-mark labels are practice allocations. Source examination questions retain their actual printed marks.