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.1.1. Paths to (i,j)
This section
Practice test
11 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.
How do you calculate the number of paths to (2,1) from (0,0)?
Hint
Count the ways to get to the first point and then to the second.
- 2.
What is the value of paths(0,0)?
Hint
Think about staying in one spot.
- 3.
What is the key method used to calculate paths(i,j) in a grid?
- By moving only right
- By moving only up
- From neighbors on left or below
Hint
Think about the movement options on a grid.
- 4.
True or False: If there is a hole at (2,1), paths(2,1) would be zero.
- True
- False
Hint
Consider how holes affect calculations.
- 5.
Design a 5x5 grid with multiple holes. Calculate paths to (4,4) considering obstacles dynamically and using memoization. Discuss the efficiencies and pitfalls of each method.
Hint
Document steps as you fill in the grid, then analyze results.
- 6.
Create a real-life application for pathfinding similar to this grid setup. How would obstacles affect routing?
Hint
Think algorithms used in GPS applications or logistics.
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
1 more question 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