
Stacks
Authored by Achal Kaushik
Computers
University
Used 59+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What will the stack contain after the following actions?
Push(1);
Push(2);
Push(3);
Push(4);
Pop();
Pop();
Push(5);
1, 2, 3
1, 2, 3, 5
1, 2, 3, 4
1, 2, 5
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Convert the infix exression
(A + B) * (C + D)
to Postfix.
A B C * + D +
A B + C D + *
A B * C D * +
A B + C + D +
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Time complexity in accessing top element in stack in
O(1)
O(n)
O(n^2)
O(n*n)
4.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Consider the following operation performed on a stack of size 5.
Push(1);
Pop();
Push(2);
Push(3);
Pop();
Push(4);
Pop();
Pop();
Push(5);
After the completion of all operation, the no of element present on stack are
1
2
3
4
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
If the sequence of operations
push(1)
push(3)
pop
push(2)
push(2)
pop
pop
pop
push(3)
pop
are performed on a stack, the order of popped out values
3, 2, 2, 3, 1
3, 2, 1, 3, 2
2, 3, 2, 3, 1
1, 3, 2, 2, 3
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the value of the postfix expression 6 3 2 4 + – *
-18
1
40
74
7.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
The postfix form of the expression (A+ B)*(C*D- E)*F / G is?
AB + CDE * - * F *G /
AB+ CD*E - FG /**
AB + CD* E - F **G /
AB + CD* E - *F *G /
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?