[C++] Time: 0ms  Explained.
Simple & intuitive Rule based solution.\nTime: 0ms, faster than 100%.\n\n\n\nMessy but understandable colde.\n\nSimply Check for various rules.\n1. \'X\' count 
Simple & intuitive Rule based solution.\nTime: 0ms, faster than 100%.\n![image](https://assets.leetcode.com/users/3_harshit_3/image_1590472583.png)\n\n\nMessy but understandable colde.\n\nSimply Check for various rules.\n1. \'X\' count should always be same or greater by 1 than \'O\' count.\n2.  \'XXX\' & \'OOO\' cannot co-exist.\n3. If a player won already, then another player turn won\'t come. \n\n```\nclass Solution {\npublic:\n    \n    bool rules_check_pass(vector<string>& board) {\n        // 1. count(\'X\') == count(\'0\') || count(\'X\') - count(\'0\') == 1\n        int x_count = 0, o_count = 0;\n        for (auto &v:  board) {\n            for (char ch: v) {\n                if (ch == \'O\')\n                    o_count++;\n                else if(ch == \'X\')\n                    x_count++;\n            }\n        }\n        if (o_count > x_count || (x_count-o_count) > 1 )\n            return false;\n        \n        // 2. 3 continous \'XXX\' and \'000\' cannot co-exist\n        bool all_x = false, all_o = false;\n        // row win\n        for (auto &v: board) {\n            if (v == "XXX")\n                all_x = true;\n            if (v == "OOO")\n                all_o = true;            \n        }\n        // col win\n        for (int c = 0 ; c < 3 ; c++) {\n            if (board[0][c] == \'X\' && board[1][c]==\'X\' && board[2][c]==\'X\')\n                all_x = true;\n            if (board[0][c] == \'O\' && board[1][c]==\'O\' && board[2][c]==\'O\')\n                all_o = true;\n        }\n        \n        // diagnol win\n        // left to right\n        if (board[0][0] == \'X\' && board[1][1]==\'X\' && board[2][2]==\'X\')\n            all_x = true;\n        if (board[0][0] == \'O\' && board[1][1]==\'O\' && board[2][2]==\'O\')\n            all_o = true;\n        // right to left\n        if (board[0][2] == \'X\' && board[1][1]==\'X\' && board[2][0]==\'X\')\n            all_x = true;\n        if (board[0][2] == \'O\' && board[1][1]==\'O\' && board[2][0]==\'O\')\n            all_o = true;\n        \n        \n        \n        if ( all_x & all_o)\n            return false;\n        \n        // 3. A player already won, then another player turn won\'t come\n        cout << "all_x" << all_x\n             << ", x_count :" << x_count\n             << ", o_count : " << o_count << endl;\n        if (all_x) {\n            if (x_count <= o_count) // 3-X, 3-O\n                return false;\n        }\n        if (all_o) {\n            if (o_count < x_count)  // 3-X 4-O\n                return false;\n        }\n        \n        return true;\n    }\n    \n    bool validTicTacToe(vector<string>& board) {\n        return rules_check_pass(board);\n    }\n};\n```
['C']