java manhattan distance
If any ghosts is closer to the target, then you\'re dead.\n```\nclass Solution {\n    public boolean escapeGhosts(int[][] ghosts, int[] target) {\n        int t
If any ghosts is closer to the target, then you\'re dead.\n```\nclass Solution {\n    public boolean escapeGhosts(int[][] ghosts, int[] target) {\n        int toTarget = dist(target, new int[]{0,0});\n        \n        for(int[] g : ghosts){\n            if(dist(g,target) <= toTarget) return false;\n        }\n        \n        return true;\n    }\n    \n    public int dist(int[] p1, int[] p2){\n        return Math.abs(p1[0]-p2[0]) + Math.abs(p1[1]-p2[1]);\n    }\n    \n}
[]