Create a recursive algorithm that determines if a path exists from the outside of the debris field
Fantastic news! We've Found the answer you've been seeking!
Question:
- Create a recursive algorithm that determines if a path exists from the outside of the debris field to the center. The debris field is always square (n by n) and n will always be greater than 1, and always odd. You can enter the debris field from any of the outside spaces, and you simply need to return true if a path exists, and false if a path does not exist. For movement you can only go up, down, left or right. You cannot move diagonally. I have included a small file for you to write your code in before you merge it with the remainder of your assignment (In the additional files section of this module). Your method name MUST use the following header:
- private void findCenter(int row, int column) {
}
Related Book For
Concepts of Database Management
ISBN: 978-1285427102
8th edition
Authors: Philip J. Pratt, Mary Z. Last
Posted Date: