MCPcopy Create free account
hub / github.com/careercup/ctci / isFree

Method isFree

java/Chapter 9/Question9_2/QuestionR.java:12–18  ·  view source on GitHub ↗
(int x, int y)

Source from the content-addressed store, hash-verified

10 public static int[][] maze = new int[10][10];
11
12 public static boolean isFree(int x, int y) {
13 if (maze[x][y] == 0) {
14 return false;
15 } else {
16 return true;
17 }
18 }
19
20 public static boolean getPath(int x, int y, ArrayList<Point> path) {
21 // If out of bounds or not available, return.

Callers 1

getPathMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected