摘要:
昨天面试微软又考到层次遍历。添上leetcode此题代码class Solution { public: vector<vector<int> > zigzagLevelOrder(TreeNode *root) { vector<vector<int>>result; if(root==NULL)return result; vector<int>levelresult; vector<TreeNode *>v; int last=0; int front=0; int rear=0; TreeNode *p=root; 阅读全文