[Python3] BFS without repeating cells
\nclass Solution:\n    def queensAttacktheKing(self, queens: List[List[int]], king: List[int]) -> List[List[int]]:\n        res=[]\n        x,y=king\n        ar
```\nclass Solution:\n    def queensAttacktheKing(self, queens: List[List[int]], king: List[int]) -> List[List[int]]:\n        res=[]\n        x,y=king\n        arr=[(1,0),(-1,0),(0,1),(0,-1),(1,1),(-1,-1),(1,-1),(-1,1)]\n        queens=set(tuple(el) for el in queens)\n        deque=collections.deque()\n        for el in arr:\n            deque.append((x+el[0],y+el[1],el))\n        while deque:\n            x,y,increment=deque.popleft()\n            if 0<=x<8 and 0<=y<8:\n                if (x,y) in queens:\n                    res.append([x,y])\n                    continue\n                addX,addY=increment\n                deque.append((x+addX,y+addY,increment))\n        return res\n```
[]