C++ | Simple BFS [ Faster than 100% ]
CODE\n\nclass Solution {\npublic:\n    \n    int maximumDetonation(vector<vector<int>>& bombs) {\n        ios::sync_with_stdio(false); cin.tie(NULL);\n\t\t\n   
**CODE**\n```\nclass Solution {\npublic:\n    \n    int maximumDetonation(vector<vector<int>>& bombs) {\n        ios::sync_with_stdio(false); cin.tie(NULL);\n\t\t\n        const int n = bombs.size();\n\t\t\n        vector<vector<int>>v(n);\n        \n        for(int i = 0; i < n; i++) {\n            long long r = (long long)bombs[i][2] * bombs[i][2];\n            for(int j = 0; j < n; j++) {\n                if(i != j){\n                    if((long long)((long long)bombs[i][0]-bombs[j][0]) * ((long long)bombs[i][0]-bombs[j][0])+(long long)(bombs[i][1]-bombs[j][1]) * ((long long)bombs[i][1]-bombs[j][1]) <= r){\n                       v[i].push_back(j);\n                    }\n                }\n            }\n        }\n        \n        int ans = 1;\n        // try each bomb and choose that which contributes maximum detonation.\n        for(int i = 0; i < n; i++){\n            vector<bool>vis(n, 0);\n            int mx = 0;\n            \n\t\t\tqueue<int>q;\n            q.push(i);\n\t\t\t\n            while(!q.empty()) {\n                int s = q.size();\n                for(int i = 0; i < s; i++) {\n                    int x = q.front();\n                    q.pop();\n                    vis[x] = 1;\n                    mx++;\n                    for(auto p : v[x]) {\n                        if(!vis[p]) {\n                            q.push(p);\n                            vis[p] = 1;\n                        }\n                    }\n                }\n            }\n            ans = max(ans, mx);\n        }\n        \n        return ans;\n    }\n};\n```\n**Useful Problem link**\nhttps://leetcode.com/problems/queries-on-number-of-points-inside-a-circle/\n\n**Do Upvote if you like the solution**
['Breadth-First Search']