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

Method isFree

java/Chapter 9/Question9_2/QuestionDP.java:13–19  ·  view source on GitHub ↗
(int x, int y)

Source from the content-addressed store, hash-verified

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

Callers 1

getPathMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected