BFS SOLUTION
\nclass Pair\n{\n    int x,y,r;\n    Pair(int x,int y,int r)\n    {\n        this.x = x;\n        this.y = y;\n        this.r = r;\n    }\n}\n\nclass Solution \
```\nclass Pair\n{\n    int x,y,r;\n    Pair(int x,int y,int r)\n    {\n        this.x = x;\n        this.y = y;\n        this.r = r;\n    }\n}\n\nclass Solution \n{\n    int max = 1 ,ans = 1;\n    public int maximumDetonation(int[][] bombs) \n    {\n        \n        for(int i=0;i<bombs.length;i++)\n        {\n            bfs(bombs,i);\n        }\n        \n        return max;\n    }\n    \n    void bfs(int bombs[][] ,int ind)\n    {\n        Queue<Pair> q = new LinkedList<>();\n        q.offer(new Pair(bombs[ind][0],bombs[ind][1],bombs[ind][2]));\n        boolean vis[] = new boolean[bombs.length];\n        vis[ind] = true;\n        ans = 1;\n        \n        while(!q.isEmpty())\n        {\n            int x = q.peek().x;\n            int y = q.peek().y;\n            int r = q.peek().r;\n            q.poll();\n            for(int i=0;i<bombs.length;i++)\n            {\n                if(vis[i] == true)\n                    continue;\n                \n                if(check(x,y,bombs[i][0],bombs[i][1],r) == true)\n                {\n                    ans++;\n                    q.offer(new Pair(bombs[i][0],bombs[i][1],bombs[i][2]));\n                    vis[i] = true;\n                }    \n            }\n        }\n        max = Math.max(max , ans);\n    }\n\t\n    boolean check(int x1 ,int y1 ,int x2, int y2 ,int r)\n    {\n        long dist = (x1-x2)*(x1-x2) + (y1-y2)*(y1-y2);\n        \n        if(r*r >= dist)\n            return true;\n        \n        return false;\n    }\n}\n```
['Breadth-First Search', 'Java']