SUPER-UGLY Python one-liner for those who are into this stuff :D
\nclass Solution:\n    def nearestValidPoint(self, x: int, y: int, points: List[List[int]]) -> int:\n        return min(map(lambda p:[abs(p[0] - x) + abs(p[1] -
```\nclass Solution:\n    def nearestValidPoint(self, x: int, y: int, points: List[List[int]]) -> int:\n        return min(map(lambda p:[abs(p[0] - x) + abs(p[1] - y), p[2]], list(filter(lambda p:p[0] == x or p[1] == y, map(lambda l:l[1] + [l[0]], enumerate(points)))) or [[0,0,-1]]))[1]\n```
['Python']