Authentic CBSE board questions & official stepwise marking scheme solutions for Stack (Chapter 5).
Data Structures: Stack PYQs (2022–2026)
LIFO principle, implementing stack algorithms using Python lists, Push operations with dictionary filtering criteria, Pop operations with Underflow detection, and Peek/Display routines.
Key Topics: LIFO Principle, Push with Filtering Criteria, Pop with Underflow Check, Peek & Stack Traversal, Dictionary-to-Stack Mapping
Stack Previous Year Questions & Solutions (7 Questions)
Q30 • CBSE 2026 • 3 Marks • Stack (Chapter 5)
CBSE Class 12 Stack (Chapter 5) (2026) 3-Mark Board Question Q30
Official CBSE Marking Scheme Solution
Push only if Fruit['Price'] < 100. Pop with pop(); if empty print UNDERFLOW. Display top-to-bottom using
reversed(FruitStack); if empty print EMPTY STACK.

Q30 • CBSE 2025 • 3 Marks • Stack (Chapter 5)
CBSE Class 12 Stack (Chapter 5) (2025) 3-Mark Board Question Q30
Official CBSE Marking Scheme Solution
push_Clr appends new_Clr. pop_Clr returns stack.pop(), or prints Underflow if empty. isEmpty returns len(ClrStack) == 0.
def push_trail(N, myStack):
myStack.extend(N[-5:])
def pop_one(myStack):
if not myStack: print("Stack Underflow"); return None
return myStack.pop()
def display_all(myStack):
if not myStack: print("Empty Stack")
else: print(*reversed(myStack), sep="\n")

Q30 • CBSE 2024 • 3 Marks • Stack (Chapter 5)
CBSE Class 12 Stack (Chapter 5) (2024) 3-Mark Board Question Q30
Official CBSE Marking Scheme Solution
Push every number with at least five digits. Pop and print until empty; then print Stack Empty. Sample pop order: 92765,
31498, 1297653, 254923, 10025, Stack Empty.

Q18 • CBSE 2023 • 1 Mark • Stack (Chapter 5)
CBSE Class 12 Stack (Chapter 5) (2023) 1-Mark Board Question Q18
Official CBSE Marking Scheme Solution
Assertion true; Reason true in the intended list implementation, but the core definition of a stack is LIFO (last in, first out).

Q30 • CBSE 2023 • 3 Marks • Stack (Chapter 5)
CBSE Class 12 Stack (Chapter 5) (2023) 3-Mark Board Question Q30
Official CBSE Marking Scheme Solution
Push_Cust: push each customer name whose room type is "Delux". Pop_Cust: while stack is not empty, print(pop()); when empty p
def Push(Vehicle):
for car, maker in Vehicle.items():
if maker.lower() == "tata": stack.append(car)

Q1 • CBSE 2022 • 2 Marks • Stack (Chapter 5)
CBSE Class 12 Stack (Chapter 5) (2022) 2-Mark Board Question Q1
Official CBSE Marking Scheme Solution
LIFO (Last In, First Out); use list.pop(), e.g. stack.pop().

Q8 • CBSE 2022 • 3 Marks • Stack (Chapter 5)
CBSE Class 12 Stack (Chapter 5) (2022) 3-Mark Board Question Q8
Official CBSE Marking Scheme Solution
def PushNv(N):
for word in N:
if not any(ch.lower() in "aeiou" for ch in word):
NoVowel.append(word)
# Pop until empty, then print EmptyStack.
def Push3_5(N):
for n in N:
if n % 3 == 0 or n % 5 == 0:
Only3_5.append(n)
