Python: Check 8 directions, concise solution. 99.81% fast, 100% less memory usage
\ndef queensAttacktheKing(self, queens: List[List[int]], king: List[int]) -> List[List[int]]:\n\tdef attack(x, y, dx, dy):\n\t\twhile 0 <= x < 8 and 0 <= y < 8:
```\ndef queensAttacktheKing(self, queens: List[List[int]], king: List[int]) -> List[List[int]]:\n\tdef attack(x, y, dx, dy):\n\t\twhile 0 <= x < 8 and 0 <= y < 8:\n\t\t\tx += dx; y += dy\n\t\t\tif (x, y) in queens: result.append([x, y]); return\n        \n\tqueens = set(map(tuple, queens))\n    result = []\n    for dx, dy in [(-1, -1), (-1, 0), (-1, 1), (0, -1), (0, 1), (1, -1), (1, 0), (1, 1)]: attack(king[0], king[1], dx, dy)\n    return result\n```
[]