DATA STRUCTURES
Unit IV · Stacks and Queues
Clear answers, algorithms and worked examples for the current syllabus.
Questions and answers
- 01What is the stack access rule?2 marks
- 02Explain the stack ADT and array-based push, pop and peek.5 marks
- 03Where should a singly linked stack keep its top?2 marks
- 04Explain a stack implemented using a singly linked list.5 marks
- 05What is the final peek after the supplied eight operations?2 marks
- 06Trace the supplied sequence of stack operations and find the final peek.5 marks
- 07Why are operators temporarily stored during infix conversion?2 marks
- 08Explain infix-to-postfix conversion using a stack with worked expressions.5 marks
- 09In postfix evaluation, which popped value is the right operand?2 marks
- 10Explain postfix evaluation using a stack with the supplied numerical expression.5 marks
- 11What must match a closing bracket?2 marks
- 12Explain balancing parentheses, brackets and braces using a stack.5 marks
- 13What is an expression tree?2 marks
- 14Explain expression trees, construction from postfix and traversals.5 marks
- 15What is a queue’s removal rule?2 marks
- 16Explain the queue ADT, operations, overflow, underflow and applications.5 marks
- 17How does a count-based circular queue distinguish full from empty?2 marks
- 18Explain a circular array queue with full and empty conditions.5 marks
- 19Why maintain both front and rear for a linked queue?2 marks
- 20Explain a queue implemented using a singly linked list.5 marks
- 21Distinguish a stack and a queue.2 marks
- 22Compare stacks and queues and explain a queue implemented using two stacks.5 marks
No matching questions. Change the search or marks filter.
The 2- and 5-mark labels are practice allocations. Source examination questions retain their actual printed marks.