Python short and clean. DFS. Functional programming.
Approach\nTL;DR, Similar to Editorial Solution but shorter and cleaner.\n\n# Complexity\n- Time complexity: O(n ^ 3)\n\n- Space complexity: O(n ^ 2)\n\n# Code\n
# Approach\nTL;DR, Similar to [Editorial Solution](https://leetcode.com/problems/detonate-the-maximum-bombs/editorial/) but shorter and cleaner.\n\n# Complexity\n- Time complexity: $$O(n ^ 3)$$\n\n- Space complexity: $$O(n ^ 2)$$\n\n# Code\n```python\nclass Solution:\n    def maximumDetonation(self, bombs: list[list[int]]) -> int:\n        Bomb = tuple[int, int, int]\n        T = Hashable\n        Graph = Mapping[T, Collection[T]]\n\n        def in_range(b1: Bomb, b2: Bomb) -> bool:\n            return (b1[0] - b2[0]) ** 2 + (b1[1] - b2[1]) ** 2 <= b1[2] ** 2\n\n        def connections(graph: Graph, src: T, seen: set[T]) -> int:\n            return seen.add(src) or 1 + sum(connections(graph, x, seen) for x in graph[src] if x not in seen)\n\n        g = {i: tuple(j for j, b2 in enumerate(bombs) if in_range(b1, b2)) for i, b1 in enumerate(bombs)}\n        return max(connections(g, x, set()) for x in g)\n\n\n```
['Depth-First Search', 'Graph', 'Geometry', 'Python', 'Python3']