
DSA-21-7-25
Authored by Geetha D
Computers
University
Used 1+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following correctly represents the algorithm for pushing an element onto a stack using an array?
if (top == MAX - 1)
print("Overflow");
else {
top++;
stack[top] = item;
}
if (top == -1)
print("Underflow");
else {
top--;
stack[top] = item;
}
top++;
stack[top] = item;
top--;
stack[top] = item;
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What condition indicates stack underflow during a pop operation?
top == MAX
top == 0
top == -1
top > MAX
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the result of this postfix expression evaluation?
5 3 2 * +
16
11
21
13
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the algorithm for checking if a string has balanced parentheses using a stack?
Traverse the string
Push opening brackets
For each closing bracket, check and pop
If stack is empty at the end → balanced
Push only closing brackets
At end, check if stack size is 2
Ignore brackets
Count them manually
Always return true
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following algorithms can be solved using stack?
Infix to Postfix Conversion
Expression Evaluation
Balanced Parentheses
all the above
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The time complexity of push() and pop() in a stack is:
O(n)
O(n log n)
O(1)
O(log n)
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A stack can be implemented using:
Arrays only
Linked List only
Both Arrays and Linked List
None of the above
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?
Similar Resources on Wayground
10 questions
Creating tables in HTML
Quiz
•
University
15 questions
Ipad
Quiz
•
1st Grade - Professio...
15 questions
Javascript Array dan Object
Quiz
•
University
15 questions
Pra UAS Algoritma dan Pemrograman Lanjut
Quiz
•
University
10 questions
C++ quiz
Quiz
•
10th Grade - Professi...
10 questions
Списки Python + Pygame
Quiz
•
KG - University
15 questions
NSCC-CODE TO COIN
Quiz
•
University
10 questions
Stack & Queue
Quiz
•
University
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
10 questions
Probability Practice
Quiz
•
4th Grade
15 questions
Probability on Number LIne
Quiz
•
4th Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
6 questions
Appropriate Chromebook Usage
Lesson
•
7th Grade
10 questions
Greek Bases tele and phon
Quiz
•
6th - 8th Grade
Discover more resources for Computers
12 questions
IREAD Week 4 - Review
Quiz
•
3rd Grade - University
20 questions
Endocrine System
Quiz
•
University
7 questions
Renewable and Nonrenewable Resources
Interactive video
•
4th Grade - University
30 questions
W25: PSYCH 250 - Exam 2 Practice
Quiz
•
University
5 questions
Inherited and Acquired Traits of Animals
Interactive video
•
4th Grade - University
20 questions
Implicit vs. Explicit
Quiz
•
6th Grade - University
7 questions
Comparing Fractions
Interactive video
•
1st Grade - University
38 questions
Unit 8 Review - Absolutism & Revolution
Quiz
•
10th Grade - University