![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
剑指offer错题
qq_39575851
这个作者很懒,什么都没留下…
展开
-
牛客剑指offer,栈的压入弹出
class Solution {public: bool IsPopOrder(vector<int> pushV,vector<int> popV) { bool bPossible =false; int nLength = pushV.size(); if(!pushV.empty() && !...原创 2019-04-11 17:06:17 · 75 阅读 · 2 评论 -
牛客刷题,反转链表
/*struct ListNode { int val; struct ListNode *next; ListNode(int x) : val(x), next(NULL) { }};*/class Solution {public: ListNode* ReverseList(ListNode* pHead) { if(pHead == nullp...原创 2019-04-09 21:33:17 · 235 阅读 · 2 评论 -
按之字形打印二叉树
class Solution {public: vector<vector<int> > Print(TreeNode* pRoot) { vector<vector<int>> v1; vector<int> v2; if(pRoot == nullptr) ...原创 2019-05-15 21:58:35 · 107 阅读 · 1 评论