Neat Code Java DFS
```\n public int maximumDetonation(int[][] bombs) {\n        int n = bombs.length, ans = 0;\n        for (int i = 0; i < n; i++) {\n            ans = Math.max(a
```\n public int maximumDetonation(int[][] bombs) {\n        int n = bombs.length, ans = 0;\n        for (int i = 0; i < n; i++) {\n            ans = Math.max(ans, dfs(i, new boolean[n], bombs));\n        }\n        return ans;\n    }\n\n    private int dfs(int idx, boolean[] v, int[][] bombs) {\n        int count = 1;\n        v[idx] = true;\n        int n = bombs.length;\n        for (int i = 0; i < n; i++) {\n            if (!v[i] && inRange(bombs[idx], bombs[i])) {\n                count += dfs(i, v, bombs);\n            }\n        }\n        return count;\n    }\n\n    private boolean inRange(int[] a, int[] b) {\n        long dx = a[0] - b[0], dy = a[1] - b[1], r = a[2];\n        return dx * dx + dy * dy <= r * r;\n    }\n
['Depth-First Search', 'Java']