Escape The Ghosts
Complexity
Time complexity: O(Len(ghosts))

Space complexity: O(1)
Code


# Complexity
- Time complexity: O(Len(ghosts))
<!-- Add your time complexity here, e.g. $$O(n)$$ -->

- Space complexity: O(1)
<!-- Add your space complexity here, e.g. $$O(n)$$ -->

# Code
```python []
class Solution(object):
    def escapeGhosts(self, ghosts, target):
        """
        :type ghosts: List[List[int]]
        :type target: List[int]
        :rtype: bool
        """
        player_distance = abs(target[0]) + abs(target[1])
        
        for ghost in ghosts:
            ghost_distance = abs(ghost[0] - target[0]) + abs(ghost[1] - target[1])
            if ghost_distance <= player_distance:
                return False  
        
        return True  
```
['Array', 'Math', 'Python']