int find(int[] current, int[] target, List<List<Integer>> forest) {
        int m = forest.size();
        int n = forest.get(0).size();
        boolean[][] visited = new boolean[m][n];

        visited[current[0]][current[1]] = true;

        Queue<int[]> q = new LinkedList<>();
        q.add(current);
        int count = 0;
        while (!q.isEmpty()) {
            int size = q.size();
            for (int i = 0; i < size; i++) {
                int[] c = q.remove();
                if (c[0] == target[0] && c[1] == target[1])
                    return count;

                for (int[] d : dir) {
                    int f = c[0] + d[0];
                    int s = c[1] + d[1];
                    if (f < 0 || s < 0 || f >= m || s >= n || forest.get(f).get(s) == 0 || visited[f][s])
                        continue;
                    q.add(new int[] { f, s });
                    visited[f][s] = true;
                }
            }
            count++;
        }
        return -1;
    }
Why Did you create this class? what does it do?
src/problems/hard/CutOffTreesForGolfEvent.java