🏆C++ || Easy DFS
Code\n\nclass Solution\n{\npublic:\n    int dfs(vector<int> &v, vector<vector<int>> &b, int i)\n    {\n        v[i] = 1;\n        int x = b[i][0], y = b[i][1];\
# Code\n```\nclass Solution\n{\npublic:\n    int dfs(vector<int> &v, vector<vector<int>> &b, int i)\n    {\n        v[i] = 1;\n        int x = b[i][0], y = b[i][1];\n        int r = b[i][2];\n        int j = 0;\n        int ans = 1;\n        for (int j = 0; j < b.size(); j++)\n        {\n            long long g = abs(x - b[j][0]);\n            g *= g;\n            long long gg = abs(y - b[j][1]);\n            gg *= gg;\n            double dis = sqrt(g + gg);\n            if (dis <= (r) && !v[j])\n            {\n                ans += dfs(v, b, j);\n            }\n        }\n        return ans;\n    }\n    int maximumDetonation(vector<vector<int>> &b)\n    {\n        int n = b.size();\n        int ans = 0;\n        for (int i = 0; i < n; i++)\n        {\n            vector<int> v(n, 0);\n            if (!v[i])\n            {\n                ans = max(ans, dfs(v, b, i));\n            }\n        }\n        return ans;\n    }\n};\n```\n![upvote (2).jpg](https://assets.leetcode.com/users/images/a5d5993c-bc66-4076-8557-f5928282fe17_1685692639.1890407.jpeg)\n
['C++']