80% Faster C++ Solution
\nclass Solution {\npublic:\n    vector<vector<int>>  res;\n    \n    void checkForQueen(int row,int col,int rowChange,int colChange,vector<vector<char>>& chess
```\nclass Solution {\npublic:\n    vector<vector<int>>  res;\n    \n    void checkForQueen(int row,int col,int rowChange,int colChange,vector<vector<char>>& chess)\n    {\n        if(row < 0 || col < 0 || row == 8 || col == 8)\n        {\n            return;\n        }\n        \n        if(chess[row][col] == \'Q\')\n        {\n            vector<int> add;\n            add.push_back(row);\n            add.push_back(col);\n            res.push_back(add);\n            return;\n        }else{\n            checkForQueen(row+rowChange,col+colChange,rowChange,colChange,chess);\n        }\n    }\n    \n    vector<vector<int>> queensAttacktheKing(vector<vector<int>>& queens, vector<int>& king) {\n        vector<vector<char>> chess(8,vector<char> (8,\'.\'));\n        chess[king[0]][king[1]] = \'K\';\n        for(int i=0;i<queens.size();i++)\n        {\n            chess[queens[i][0]][queens[i][1]] = \'Q\';\n        }\n        \n        checkForQueen(king[0],king[1],-1,0,chess);\n        checkForQueen(king[0],king[1],1,0,chess);\n        checkForQueen(king[0],king[1],-1,-1,chess);\n        checkForQueen(king[0],king[1],-1,1,chess);\n        checkForQueen(king[0],king[1],1,-1,chess);\n        checkForQueen(king[0],king[1],1,1,chess);\n        checkForQueen(king[0],king[1],0,-1,chess);\n        checkForQueen(king[0],king[1],0,1,chess);\n        \n        return res;\n    }\n};\n```
[]