Java DFS
\nclass Solution {\n    public int maximumDetonation(int[][] bombs) {\n        int n = bombs.length;\n        Circle[] circles = new Circle[n];\n        for(int
```\nclass Solution {\n    public int maximumDetonation(int[][] bombs) {\n        int n = bombs.length;\n        Circle[] circles = new Circle[n];\n        for(int i=0;i<n;i++) circles[i] = new Circle(bombs[i][0],bombs[i][1],bombs[i][2]);\n        List<List<Integer>> graph = new ArrayList<>();\n        for(int i=0;i<n;i++) graph.add(new ArrayList<>());\n        for(int i=0;i<n;i++){\n            for(int j=0;j<n;j++){\n                if(i==j) continue;\n                if(circles[i].canDetonate(circles[j]))\n                    graph.get(i).add(j);\n            }\n        }\n        int answer = 0;\n        for(int i=0;i<n;i++) answer = Math.max(answer,dfs(graph,new boolean[n],i));\n        return answer;\n    }\n    private int dfs(List<List<Integer>> graph, boolean[] visited, int node){\n        int res = 1;\n        visited[node] = true;\n        for(int child: graph.get(node)){\n            if(visited[child]) continue;\n            res += dfs(graph,visited,child);\n        }\n        return res;\n    }\n}\nclass Circle{\n    int x;\n    int y;\n    int r;\n\n    public Circle(int x, int y, int r) {\n        this.x = x;\n        this.y = y;\n        this.r = r;\n    }\n    public boolean canDetonate(Circle other){\n        return this.r>=Math.sqrt(Math.pow(Math.abs(this.x-other.x),2)+Math.pow(Math.abs(this.y-other.y),2));\n    }\n    \n}\n```
['Depth-First Search', 'Java']