Java with comments 11ms beats 100% DFS
graph is a adjacency list.\n\nclass Solution {\n    public int maximumDetonation(int[][] bombs) {\n        int n = bombs.length;\n        List<Integer>[] graph 
graph is a adjacency list.\n```\nclass Solution {\n    public int maximumDetonation(int[][] bombs) {\n        int n = bombs.length;\n        List<Integer>[] graph = new List[n];\n        for (int i = 0; i < n; i++) graph[i] =  new ArrayList<Integer>();\n\t\t// O(n^2 /2)  by using j = i+1\n\t\t for (int i = 0; i < n; i++) {\n            for (int j = i+1; j < n; j++) {\n                // use double since multiplying large values like 10^5 will cause overflow\n                double dx = bombs[i][0] - bombs[j][0];\n                double dy = bombs[i][1] - bombs[j][1];\n                double r1  = bombs[i][2], r2  = bombs[j][2];\n                double dist =  dx * dx + dy * dy;\n                if ( dist <= r1 * r1) graph[i].add(j);\n                if ( dist <= r2 * r2) graph[j].add(i);\n            }\n            \n        }\n        boolean[] visited = new boolean[n];\n        int ans = 0;\n        for (int i = 0; i < n; i++) {\n            ans = Math.max(ans, dfs(graph, i, visited));\n            if (ans == n) return ans; //all of the nodes can be visited\n            Arrays.fill(visited, false);\n        }\n        return ans;\n    }\n    private int dfs(List<Integer>[] graph, int i, boolean[] visited) {\n        int cc = 0;\n        if (visited[i]) return 0;\n        visited[i] = true;\n        for (int neigh: graph[i]) {\n            cc += dfs(graph, neigh, visited);\n        }\n        return cc + 1;\n    }\n    \n}\n```
['Depth-First Search', 'Java']