Stack Data Structure

Quiz
•
Other
•
University
•
Medium
Padmavati Pise
Used 823+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In a stack, if a user tries to remove an element from empty stack it is called _________
Underflow
Empty collection
Overflow
Garbage Collection
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Process of inserting an element in stack is called ____________
Create
Push
Evaluation
Pop
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Consider the usual algorithm for determining whether a sequence of parentheses is balanced.
Suppose that you run the algorithm on a sequence that contains 2 left parentheses and 3 right parentheses (in some order).
The maximum number of parentheses that appear on the stack AT ANY ONE TIME during the computation?
1
2
3
4 or more
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
User perform following operations on stack of size 5 then -
push(1);
pop();
push(2);
push(3);
pop();
push(2);
pop();
pop();
push(4);
pop();
pop();
push(5);
Overflow Occurs
Stack Operations will be performed Smoothly
Underflow Occurs
None of these
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the value of the postfix expression 6 3 2 4 + – *
1
40
74
-18
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
The following postfix expression with single digit operands is evaluated using a stack:
8 2 3 ^ / 2 3 * + 5 1 * -
6,1
5,7
3,2
1,5
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
To evaluate an expression without any embedded function calls:
One stack is enough
Two stacks are needed
As many stacks as the height of the expression tree are needed
A Turing machine is needed in the general case
Create a free account and access millions of resources
Similar Resources on Wayground
15 questions
DEPTH DIVE

Quiz
•
University
11 questions
STUMBLE GUYS

Quiz
•
KG - Professional Dev...
8 questions
Pop Art

Quiz
•
University
10 questions
JGD Quiz

Quiz
•
University
15 questions
Guess!!!

Quiz
•
University
14 questions
POP SMOKE!!!!

Quiz
•
KG - Professional Dev...
10 questions
المسابقة الأولى

Quiz
•
University
10 questions
Aaruth Quiz

Quiz
•
University
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Other
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

Quiz
•
8th Grade - University
7 questions
Force and Motion

Interactive video
•
4th Grade - University
36 questions
Unit 5 Key Terms

Quiz
•
11th Grade - University
7 questions
Figurative Language: Idioms, Similes, and Metaphors

Interactive video
•
4th Grade - University
15 questions
Properties of Equality

Quiz
•
8th Grade - University
38 questions
WH - Unit 3 Exam Review*

Quiz
•
10th Grade - University
21 questions
Advise vs. Advice

Quiz
•
6th Grade - University
12 questions
Reading a ruler!

Quiz
•
9th Grade - University