Python3 Solution
\n\nclass Solution:\n    def maximumDetonation(self, bombs: List[List[int]]) -> int:\n        graph = [[] for _ in bombs]\n        for i, (xi, yi, ri) in enumer
\n```\nclass Solution:\n    def maximumDetonation(self, bombs: List[List[int]]) -> int:\n        graph = [[] for _ in bombs]\n        for i, (xi, yi, ri) in enumerate(bombs): \n            for j, (xj, yj, rj) in enumerate(bombs): \n                if i < j: \n                    dist2 = (xi-xj)**2 + (yi-yj)**2\n                    if dist2 <= ri**2:\n                        graph[i].append(j)\n                    if dist2 <= rj**2:\n                        graph[j].append(i)\n        \n        def fn(x):\n            ans = 1\n            seen = {x}\n            stack = [x]\n            while stack: \n                u = stack.pop()\n                for v in graph[u]: \n                    if v not in seen: \n                        ans += 1\n                        seen.add(v)\n                        stack.append(v)\n            return ans \n        \n        return max(fn(x) for x in range(len(bombs)))\n```
['Python', 'Python3']