Java 1 ms Simple Implementation
```\n\tpublic List> queensAttacktheKing(int[][] queens, int[] king) {\n        List> coordinates= new ArrayList>();\n        boolean[][] chessBoard= new boolean
```\n\tpublic List<List<Integer>> queensAttacktheKing(int[][] queens, int[] king) {\n        List<List<Integer>> coordinates= new ArrayList<List<Integer>>();\n        boolean[][] chessBoard= new boolean[8][8];\n        for(int[] queenPos : queens){\n            int x= queenPos[0], y= queenPos[1];\n            chessBoard[x][y]= true;\n        }\n        int kx= king[0], ky= king[1];\n        for(int i= kx-1; i>=0; i--){\n            if(chessBoard[i][ky]){\n                List<Integer> pos= Arrays.asList(i,ky);\n                coordinates.add(pos);\n                break;\n            }\n        }\n        for(int i= kx+1; i<8; i++){\n            if(chessBoard[i][ky]){\n                List<Integer> pos= Arrays.asList(i,ky);\n                coordinates.add(pos);\n                break;\n            }\n        }\n        for(int j= ky-1; j>=0; j--){\n            if(chessBoard[kx][j]){\n                List<Integer> pos= Arrays.asList(kx,j);\n                coordinates.add(pos);\n                break;\n            }\n        }\n        for(int j= ky+1; j<8; j++){\n            if(chessBoard[kx][j]){\n                List<Integer> pos= Arrays.asList(kx,j);\n                coordinates.add(pos);\n                break;\n            }\n        }\n        for(int i= kx-1, j= ky-1; i>=0 && j>=0; i--, j--){\n            if(chessBoard[i][j]){\n                List<Integer> pos= Arrays.asList(i,j);\n                coordinates.add(pos);\n                break;\n            }\n        }\n        for(int i= kx-1, j= ky+1; i>=0 && j<8; i--, j++){\n            if(chessBoard[i][j]){\n                List<Integer> pos= Arrays.asList(i,j);\n                coordinates.add(pos);\n                break;\n            }\n        }\n        for(int i= kx+1, j= ky+1; i<8 && j<8; i++, j++){\n            if(chessBoard[i][j]){\n                List<Integer> pos= Arrays.asList(i,j);\n                coordinates.add(pos);\n                break;\n            }\n        }\n        for(int i= kx+1, j= ky-1; i<8 && j>=0; i++, j--){\n            if(chessBoard[i][j]){\n                List<Integer> pos= Arrays.asList(i,j);\n                coordinates.add(pos);\n                break;\n            }\n        }\n        return coordinates;\n    }
[]