EASY TO UNDERSTAND | C++ | DFS
\n\nclass Solution {\npublic:\n    int cnt = 0;\n    void dfs(vector<int> adj[], vector<int>& v, int i){\n        cnt++;\n        v[i] = 1;\n        for(int x: 
\n```\nclass Solution {\npublic:\n    int cnt = 0;\n    void dfs(vector<int> adj[], vector<int>& v, int i){\n        cnt++;\n        v[i] = 1;\n        for(int x: adj[i])\n            if(!v[x])\n                dfs(adj, v, x);\n    }\n    void makeAdjList(vector<vector<int>>& b, vector<int> adj[]){\n        for(int i = 0; i<b.size(); ++i){\n            for(int j = 0; j<b.size(); ++j){\n                if(i!=j)\n                    if(pow(b[j][0] - b[i][0], 2) + pow(b[j][1] - b[i][1], 2) - pow(b[i][2],2) <= 0)\n                        adj[i].push_back(j);\n            }\n        }\n    }\n    int maximumDetonation(vector<vector<int>>& b) {\n        vector<int> adj[b.size()];\n        makeAdjList(b, adj);\n        int res = 0;\n        for(int i = 0; i<b.size(); ++i){\n            vector<int> v(b.size(), 0);\n            cnt = 0;\n            dfs(adj, v, i);\n            res = max(res, cnt);\n        }\n        return res;\n    }\n};\n```
['Depth-First Search', 'Graph', 'C++']