
Understanding Stacks and Queues
Authored by Matthew Wemyss
Computers
11th Grade
Used 1+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the initial value of `toppointer` in the stack implementation?
0
-1
1
10
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What happens when you try to push an item onto a full stack?
The item is added to the stack
The stack is cleared
A message "Stack is full, cannot push" is printed
The stack size is increased
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
After executing the sequence of operations `push(10)`, `push(20)`, `push(30)`, `pop()`, `push(40)`, what is the value at `stack[2]`?
10
20
30
40
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the initial value of `rearPointer` in the queue implementation?
0
-1
1
10
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of the `pop()` function in the stack implementation?
To add an item to the stack
To remove the top item from the stack
To check if the stack is full
To clear the stack
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the condition to check if the stack is empty in the `pop()` function?
`toppointer == 0`
`toppointer == -1`
`toppointer == len(stack)`
`toppointer == 10`
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the initial value of `frontPointer` in the queue implementation?
0
-1
1
10
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
11 questions
Youtube
Quiz
•
4th Grade - University
20 questions
Name The Disney Animation Films
Quiz
•
KG - University
12 questions
Windows 10 Installation
Quiz
•
11th - 12th Grade
12 questions
Microsoft Office Word
Quiz
•
4th Grade - University
15 questions
Empowerment Technologies
Quiz
•
KG - 12th Grade
15 questions
Excel
Quiz
•
10th - 12th Grade
15 questions
Cyber Security KS4
Quiz
•
8th - 12th Grade
15 questions
Linux-2 Quiz 2 -- LAMP
Quiz
•
1st - 12th Grade
Popular Resources on Wayground
8 questions
Spartan Way - Classroom Responsible
Quiz
•
9th - 12th Grade
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
14 questions
Boundaries & Healthy Relationships
Lesson
•
6th - 8th Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
3 questions
Integrity and Your Health
Lesson
•
6th - 8th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
9 questions
FOREST Perception
Lesson
•
KG
20 questions
Main Idea and Details
Quiz
•
5th Grade