Question: In class, we talked about solving a grid walking problem. For this project, we'll solve one question with several parts by hand and then write
In class, we talked about solving a grid walking problem. For this project, we'll solve one question
with several parts by hand and then write a program to solve similar problems. Because the actual
answer for these problems can be very high, in your program, you'll report the answers modulo
This will require the use of the type long long in C If you use Python, no special integer
type is needed. In class a similar but shorter project example will be done so you can see what is
expected of the program, format wise. pts Write a program that will answer two types of grid walking queries that are described
in the examples above. a Given a starting location, an ending location, upto positions to visit, determines the number
of ways to go from start to end visiting each of the locations, modulo Note: you must
handle the special case indicated in problem db Given a starting location, an ending location, and one or two positions to avoid, determines the
number of ways to go from start to end avoiding the given intermediate positions, modulo
This also has a special case similar to d that must be properly coded.
Your program will run without prompting the user but will read input from standard input and
produce output to standard output as specified below. Please write your program in C or Python.
Your program will be tested on multiple sets of input.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
