
Depth first search (DFS) Quiz
Authored by Kenneth Tai
Computers
11th Grade
Used 7+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
8 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What data structure does the depth-first traversal algorithm use to keep track of the last node visited?
Queue
Stack
Array
Tree
2.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
In a depth-first traversal, what action is taken when backtracking?
Push the current node onto the stack
Pop the previous node off the stack
Skip the current node
Add a new node to the stack
3.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What is the purpose of the stack in depth-first traversal?
To store visited nodes
To store unvisited nodes
To store the path
To store the graph
4.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Which of the following is a characteristic of depth-first traversal?
It is guaranteed to find the shortest path
It explores all neighbors before moving to the next level
It uses a stack to remember the path visited
It uses a queue to remember the path
5.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What happens when a node with no unvisited neighbors is encountered in depth-first traversal?
The node is added to the stack
The node is revisited
The traversal ends
The node is removed from the stack
6.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
When will the process of depth-first traversals end?
The shortest path of the nodes is found
All nodes are visited
All data in stack are popped out
All data in queue are read out
7.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
From the tree, which of the followings is a possible output of depth first traversal?
ABFEKDIHCFLMJ
ADIJHBEKFCGML
ADHIJCGLMBEFK
ABCDEFGHIJKLM
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
8 questions
Overview of IT
Quiz
•
6th Grade - University
12 questions
Spreadsheet
Quiz
•
5th - 11th Grade
12 questions
Wee Word Intro
Quiz
•
7th - 12th Grade
12 questions
GCE AQA CS - 04 Computer Architecture
Quiz
•
10th - 11th Grade
10 questions
History of Digital Computer
Quiz
•
10th - 12th Grade
10 questions
USING HAND TOOLS
Quiz
•
11th Grade
13 questions
Five Nights At Freddy's: Security Breach Quiz
Quiz
•
KG - Professional Dev...
10 questions
BTEC DIT C3 LAA - Maintenance, Set up, Performance
Quiz
•
10th - 11th Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
29 questions
Alg. 1 Section 5.1 Coordinate Plane
Quiz
•
9th Grade
22 questions
fractions
Quiz
•
3rd Grade
11 questions
FOREST Effective communication
Lesson
•
KG
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
Discover more resources for Computers
20 questions
-AR -ER -IR present tense
Quiz
•
10th - 12th Grade
22 questions
El Imperfecto
Quiz
•
9th - 12th Grade
15 questions
ACT Reading Practice
Quiz
•
11th Grade
20 questions
SSS/SAS
Quiz
•
9th - 12th Grade
20 questions
verbos reflexivos en español
Quiz
•
9th - 12th Grade
14 questions
Making Inferences From Samples
Quiz
•
7th - 12th Grade
23 questions
CCG - CH8 Polygon angles and area Review
Quiz
•
9th - 12th Grade
8 questions
Momentum and Collisions
Lesson
•
9th - 12th Grade