✨🔥 Python: DFS Solution 🔥✨
Approach\n Describe your approach to solving the problem. \nDFS Solution\n\n# Complexity\n- Time complexity: O(N^2)\n Add your time complexity here, e.g. O(n) \
# Approach\n<!-- Describe your approach to solving the problem. -->\nDFS Solution\n\n# Complexity\n- Time complexity: O(N^2)\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity: O(N + E + V)\n    where\n    - N : Length of array\n    - E : Number of Edges\n    - V : Number of Nodes\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n- Python\n```\nclass Solution:\n    def visit(self, node, adj, vis):\n        vis[node] = 1\n        ans = 1\n        for nod in adj[node]:\n            if vis[nod] == 0:\n                ans += self.visit(nod, adj, vis)\n        return ans\n        \n    def maximumDetonation(self, bombs: List[List[int]]) -> int:\n        n = len(bombs)\n        adj = {i : [] for i in range(n)}\n\n        for i in range(n):\n            x1, y1, r1 = bombs[i][0], bombs[i][1], bombs[i][2] \n            for j in range(i, n):\n                x2, y2, r2 = bombs[j][0], bombs[j][1], bombs[j][2]\n                d = ((x1-x2)**2 + (y1-y2)**2)**0.5\n                if d <= r1:\n                    adj[i].append(j)\n                if d <= r2:\n                    adj[j].append(i)\n        \n        ans = 0\n\n        for i in range(n):\n            vis = [0] * n\n            if vis[i] == 0:\n                ans = max(ans, self.visit(i, adj, vis))\n        return ans                \n```\n# UPVOTE Please!!
['Python3']