[c++] 5ms version: one queue and without reverse operation by using size of each level
\nAssuming after traversing the 1st level, nodes in queue are {9, 20, 8}, And we are going to traverse 2nd level, which is even line and should print value from
  \nAssuming after traversing the 1st level, nodes in queue are {9, 20, 8}, And we are going to traverse 2nd level, which is even line and should print value from right to left [8, 20, 9]. \n\nWe know there are 3 nodes in current queue, so the vector for this level in final result should be of size 3. \nThen,     queue [i] -> goes to ->  vector[queue.size() - 1 - i]\ni.e. the ith node in current queue should be placed in (queue.size() - 1 - i) position in vector for that line.\n \nFor example, for node(9), it's index in queue is 0, so its index in vector should be (3-1-0) = 2. \n\n\n    vector<vector<int> > zigzagLevelOrder(TreeNode* root) {\n        if (root == NULL) {\n            return vector<vector<int> > ();\n        }\n        vector<vector<int> > result;\n    \n        queue<TreeNode*> nodesQueue;\n        nodesQueue.push(root);\n        bool leftToRight = true;\n    \n        while ( !nodesQueue.empty()) {\n            int size = nodesQueue.size();\n            vector<int> row(size);\n            for (int i = 0; i < size; i++) {\n                TreeNode* node = nodesQueue.front();\n                nodesQueue.pop();\n\n                // find position to fill node's value\n                int index = (leftToRight) ? i : (size - 1 - i);\n\n                row[index] = node->val;\n                if (node->left) {\n                    nodesQueue.push(node->left);\n                }\n                if (node->right) {\n                    nodesQueue.push(node->right);\n                }\n            }\n            // after this level\n            leftToRight = !leftToRight;\n            result.push_back(row);\n        }\n        return result;\n    }
['C++']