C++ |  Graphs + Math | Explained
Approach :\n\n Since the constraints are low i.e we are given only 100 bombs at max, we can, for each bomb we can find if we detonate this bomb, how many other 
**Approach :**\n\n* Since the constraints are low i.e we are given only 100 bombs at max, we can, for each bomb we can find if we detonate this bomb, how many other bombs it can detonate. \n\n* Now we can represent bombs as nodes in graph. \n* Also we need to revisit our High School Geometry, to check if a point lies outside circle or inside or on the circumference, that can be done by checking the distance between the point and centre of other circle.\n* Now if distance is greater than radius of other circle, then we cannot detonate that bomb, according to the question.\n* Then after finding the relation between bombs we can run DFS to find how many other bombs a single bomb, if detonated, can detonate.\n\n```\nclass Solution {\npublic:\n    double eucDis(int x1,int y1,int x2,int y2)\n    {\n        double temp=pow(x1-x2,2)+pow(y1-y2,2);\n        return sqrt(temp);\n    }\n    void dfs(int node,vector<int>&vis,vector<int>graph[],int &c)\n    {\n        c++;\n        vis[node]=1;\n        for(auto i:graph[node])\n        {\n            if(!vis[i])\n            {\n                dfs(i,vis,graph,c);\n            }\n        }\n    }\n    int maximumDetonation(vector<vector<int>>& bombs) {\n        \n        int n=bombs.size();\n        vector<int>graph[n+1];\n        int i,j;\n        for(i=0;i<n;i++)\n        {\n            bombs[i].push_back(i);\n        }\n        for(i=0;i<n;i++)\n        {\n            \n            for(j=0;j<n;j++)\n            {\n                if(i==j)\n                    continue;\n                double dis1=eucDis(bombs[i][0],bombs[i][1],bombs[j][0],\n                               bombs[j][1]);\n                \n                if(dis1<=bombs[i][2])\n                {\n                    int node1=bombs[i][3];\n                    int node2=bombs[j][3];\n                    graph[node1].push_back(node2);\n                }\n            }\n        }\n       \n        int maxi=1;\n        for(i=0;i<n;i++)\n        {\n            int c=0;\n            if(graph[i].empty())\n                continue;\n            vector<int>vis(n+1,0);\n            \n            dfs(i,vis,graph,c);   \n            maxi=max(maxi,c);\n            \n            \n        }\n        return maxi;\n    }\n};\n```\n\n**Runtime: 110 ms, faster than 78.69% of C++ online submissions for Detonate the Maximum Bombs.**\n\n\n**Memory Usage: 17.2 MB, less than 56.73% of C++ online submissions for Detonate the Maximum Bombs.**\n\n\n**Pls upvote the solution if you found helpful, it means a lot.\nAlso comment down your doubts.\nHappy Coding : )**
['Depth-First Search', 'Breadth-First Search', 'Graph', 'Recursion', 'C', 'C++']