Python3 memory usage less than 94.85%
```\nclass Solution:\n    def nearestValidPoint(self, x: int, y: int, points: List[List[int]]) -> int:\n        ind = -1\n        man = -1\n        for i in poi
```\nclass Solution:\n    def nearestValidPoint(self, x: int, y: int, points: List[List[int]]) -> int:\n        ind = -1\n        man = -1\n        for i in points:\n            if i[0] == x or i[1] == y:\n                if man == -1 or (abs(i[0] - x) + abs(i[1] - y)) < man:\n                    man = abs(i[0] - x) + abs(i[1] - y)\n                    ind = points.index(i)\n        return ind
['Python3']