[Java] Solution for simple folks like me
\n// Time: O(1)\n// Space: O(1)\nclass Solution {\n    public List<List<Integer>> queensAttacktheKing(int[][] queens, int[] king) {\n        List<List<Integer>>
```\n// Time: O(1)\n// Space: O(1)\nclass Solution {\n    public List<List<Integer>> queensAttacktheKing(int[][] queens, int[] king) {\n        List<List<Integer>> attackQueens = new ArrayList<>();\n        char[][] grid = new char[8][8];\n        for (int[] queen : queens) {\n            grid[queen[0]][queen[1]] = \'Q\';\n        }\n        \n        // Go down\n        for (int i = king[0]; i < 8; i++) {\n            if (grid[i][king[1]] == \'Q\') {\n                attackQueens.add(List.of(i, king[1]));\n                break;\n            }\n        }\n        \n        // Go up\n        for (int i = king[0]; i >= 0; i--) {\n            if (grid[i][king[1]] == \'Q\') {\n                attackQueens.add(List.of(i, king[1]));\n                break;\n            }\n        }\n        \n        // Go right\n        for (int i = king[1]; i < 8; i++) {\n            if (grid[king[0]][i] == \'Q\') {\n                attackQueens.add(List.of(king[0], i));\n                break;\n            }\n        }\n        \n        // Go left\n        for (int i = king[1]; i >= 0; i--) {\n            if (grid[king[0]][i] == \'Q\') {\n                attackQueens.add(List.of(king[0], i));\n                break;\n            }\n        }\n        \n        // Up left diagonal\n        for (int i = king[0], j = king[1]; i >= 0 && j >= 0; i--, j--) {\n            if (grid[i][j] == \'Q\') {\n                attackQueens.add(List.of(i, j));\n                break;\n            }\n        }\n        \n        // Up right diagonal\n        for (int i = king[0], j = king[1]; i >= 0 && j < 8; i--, j++) {\n            if (grid[i][j] == \'Q\') {\n                attackQueens.add(List.of(i, j));\n                break;\n            }\n        }\n        \n        // Down left diagonal\n        for (int i = king[0], j = king[1]; i < 8 && j >= 0; i++, j--) {\n            if (grid[i][j] == \'Q\') {\n                attackQueens.add(List.of(i, j));\n                break;\n            }\n        }\n        \n        // Down right diagonal\n        for (int i = king[0], j = king[1]; i < 8 && j < 8; i++, j++) {\n            if (grid[i][j] == \'Q\') {\n                attackQueens.add(List.of(i, j));\n                break;\n            }\n        }\n        \n        return attackQueens;\n    }\n}\n```
[]