Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Program #9 will use a 2D array of integers to represent a swamp. You will be giv

ID: 3656210 • Letter: P

Question

Program #9 will use a 2D array of integers to represent a swamp. You will be given a swamp that has already been dimensioned and initialized. Every value of 0 represents quicksand while every value of 1 represents solid ground. You will also be given an x,y pair representing your starting position inside the swap on a block of solid ground. Your job will be to follow the trail of 1's (solid ground) to the edge of the swamp - or until it dead ends. You will take one step at a time in any direction as long as that step is onto solid ground ( 1 ), and not into quicksand ( 0 ). Put simply, you are dropped into the swamp onto a block of solid ground and starting there must follow the trail of safe steps one at a time until you either reach the edge of the swamp (rescued) or reach a dead end (stranded). You are guaranteed the following: There are no cycles in your path to freedom or dead end (thus no backtracking/recursion needed). You will start out on a block of solid ground. There is only one possible path to take, and thus only one possible correct output for any given swamp.

Explanation / Answer

plz chk this link, it will hope assist u. plz don't forget life saver if u satisfied.

http://www.cs.pitt.edu/~hoffmant/F12-007/program-09/index.html

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote