Escape the ghosts | beats 100%
Intuition\nSimply use the basic coordinate geometry\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solv
# Intuition\n<b>Simply use the basic coordinate geometry</b>\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity: O(N)\nWhere N is the size of the ghost array.\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity: O(1) \nNo extra space used\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\n    public boolean escapeGhosts(int[][] ghosts, int[] target) {\n        int yourDist = Math.abs(target[0] - 0) + Math.abs(target[1] - 0);\n        for(int i=0;i<ghosts.length;i++){\n            int ghostDist = Math.abs(target[0]-ghosts[i][0]) + Math.abs(target[1]-ghosts[i][1]);\n            if(ghostDist <= yourDist) return false;\n        }\n        return true;\n    }\n}\n```
['Array', 'Math', 'Java']