Enrol to start learning
Reading is open to everyone. Enrolling is free, and it is what unlocks the audio lessons, practice tests and progress tracking.
20.4.1. Tracking Parent Vertices
This section
Practice test
12 questions on this section. Wrong answers show you what to read again.
Sign up to take itWhole chapter
Revision test
Mixed questions from across the chapter. Your answers get marked.
Sign up to take itQuick
Flashcard drill
4 cards from this lesson. Good the night before a test.
Try these first
- 1.
Define an adjacency matrix.
Hint
Think about how two vertices are related.
- 2.
What data structure is commonly used in BFS to keep track of vertices to be explored?
Hint
Remember the FIFO principle.
- 3.
What structure does BFS use to manage vertices to be explored?
- Stack
- Queue
- Array
Hint
It's the opposite of the structure that explores the last added item first.
- 4.
True or False: BFS guarantees the shortest path in terms of the number of edges in a weighted graph.
- True
- False
Hint
Think about how edges might affect traversal.
- 5.
Given a graph with 10 vertices and known edges, write out the BFS execution steps starting from vertex 1, track all parents and levels.
Hint
Pay attention to how you fill the queue and mark levels.
- 6.
Explain why a graph might require adjustments when converting from adjacency matrix to adjacency list.
Hint
Consider how many edges exist relative to the maximum possible edges.
Exercises
Total Questions
2
Estimated Time
4 min
Passing Score
70%
Instructions
- Read each question carefully
- You can use hints if you need help
- Complete all questions before submitting
4 more questions available
Enrol freeQuiz
Total Questions
2
Estimated Time
4 min
Passing Score
70%
Instructions
- Read each question carefully
- You can use hints if you need help
- Complete all questions before submitting
2 more questions available
Enrol freeChallenge Problems
Total Questions
2
Estimated Time
4 min
Passing Score
70%
Instructions
- Read each question carefully
- You can use hints if you need help
- Complete all questions before submitting