C++ Clean, easy to read code
```\nclass Solution {\npublic:\n    bool validTicTacToe(vector& board) {\n        int xCount = 0, oCount = 0;\n        \n        for (auto row : board)\n       
```\nclass Solution {\npublic:\n    bool validTicTacToe(vector<string>& board) {\n        int xCount = 0, oCount = 0;\n        \n        for (auto row : board)\n            for (auto ch : row)\n                if (ch != \' \')\n                    ch == \'X\' ? xCount++ : oCount++;\n        \n        if (oCount > xCount or xCount - oCount > 1)\n            return false;\n        \n        if (xCount >= 3)\n            if (playerWins(board, \'X\') and xCount - 1 != oCount)\n                return false;\n        \n        if (oCount >= 3)\n            if (playerWins(board, \'O\') and oCount != xCount)\n                return false;\n        \n        return true;\n    }\n    \n    bool playerWins(vector<string>& board, char ch) {\n        // check row wise\n        for (int i = 0; i < 3; i++)\n            if (board[i][0] == ch and board[i][1] == ch and board[i][2] == ch)\n                return true;\n        \n        // check column wise\n        for (int i = 0; i < 3; i++)\n            if (board[0][i] == ch and board[1][i] == ch and board[2][i] == ch)\n                return true;\n        \n        // check diagnal\n        if (board[0][0] == ch and board[1][1] == ch and board[2][2] == ch)\n            return true;\n            \n        // check anti-diagnal\n        if (board[0][2] == ch and board[1][1] == ch and board[2][0] == ch)\n            return true;            \n        \n        return false;\n    }\n};
[]