Make use of Manhattan-Distance
Intuition\n Describe your first thoughts on how to solve this problem. \nCalculate the Manhattan-Distance(MD) from (0,0) to target and try to beat it with ghost
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\nCalculate the Manhattan-Distance(MD) from (0,0) to target and try to beat it with ghosts distances.\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:  \n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\nn = ghosts\n$$O(n)$$\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n$$O(1)$$\n\n# Code\n```\nclass Solution {\n    private static int manhattenDistance(int x1, int y1, int x2, int y2){\n        return Math.abs(x1 - x2) + Math.abs(y1 - y2);\n    }\n    public boolean escapeGhosts(int[][] ghosts, int[] target) {\n        final var shortesDistance = manhattenDistance(0, 0, target[0], target[1]);\n\n        for(final var ghost : ghosts){\n            final var distance = manhattenDistance(ghost[0], ghost[1], target[0], target[1]);\n            if(distance <= shortesDistance){\n                return false;\n            }\n        }\n\n        return true;\n    }\n}\n```
['Java']