Java || Beats 100% || Easy java solution no extra unnecessary function
Intuition\nClosest to target will win\n Describe your first thoughts on how to solve this problem. \n\n# Approach\nJust check who is closest to target or who re
# Intuition\nClosest to target will win\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\nJust check who is closest to target or who reaches the target first. If ghost is faster then it can also intercept your escape so there is no point in checking interception.\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity: O(n)\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity: O(1)\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```java []\nclass Solution {\n    public boolean escapeGhosts(int[][] ghosts, int[] target) {\n        // check/iterate for each ghost\n        // if any of the ghost reaches the target first or at same time then false\n        // if ghost is faster then it can also intercept your escape so there is no point in checking interception\n        for(int i = 0; i < ghosts.length; i++){\n            \n            // calculate distance from PAC-MAN(0,0)/each ghost to target\n            if((Math.abs(target[0]) + Math.abs(target[1])) >= (Math.abs(ghosts[i][0] - target[0]) + Math.abs(ghosts[i][1] - target[1]))){\n                return false;\n            }\n        }\n        return true;\n    }\n}\n```
['Java']