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.
2.2.5. Topological Sorting
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
3 cards from this lesson. Good the night before a test.
Try these first
- 1.
What is the total number of paths from (0,0) to (1,1) in a 2x2 grid?
Hint
Consider the different orders of movements.
- 2.
If a hole exists at (1,1), how many paths are available to (2,2)?
Hint
No hint provided
- 3.
How many paths are there from (0,0) to (2,2) in an unobstructed grid?
- 2
- 4
- 6
Hint
Think about the different sequences of right and down movements.
- 4.
True or False: Dynamic programming requires a directed acyclic graph to visualize dependencies.
- True
- False
Hint
Recall how dependencies are structured.
- 5.
Given a grid with dimensions 6x6 and holes at (2,3) and (4,5), calculate how many distinct paths exist from (0,0) to (5,5).
Hint
Start from (0,0) and fill row by row or column by column.
- 6.
Explain under what conditions memoization is preferable to dynamic programming.
Hint
Consider the efficiency of recursive vs iterative solutions.
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