Java short and concise beat 100%
Start from King and reach to the Queens on 8 directions. Break on that direction if one queen is found.\n\nclass Solution {\n    public List<List<Integer>> quee
Start from King and reach to the Queens on 8 directions. Break on that direction if one queen is found.\n```\nclass Solution {\n    public List<List<Integer>> queensAttacktheKing(int[][] queens, int[] king) {\n        List<List<Integer>> result = new ArrayList<>();\n        boolean[][] seen = new boolean[8][8];\n        for (int[] queen : queens) seen[queen[0]][queen[1]] = true;\n        int[] dirs = {-1, 0, 1};\n        for (int dx : dirs) {\n            for (int dy : dirs) {\n                if (dx == 0 && dy == 0) continue;\n                int x = king[0], y = king[1];\n                while (x + dx >= 0 && x + dx < 8 && y + dy >= 0 && y + dy < 8) {\n                    x += dx;\n                    y += dy;\n                    if (seen[x][y]) {\n                        result.add(Arrays.asList(x, y));\n                        break;\n                    }\n                }\n            }\n        }\n        return result;\n    }   \n}\n```
[]