剑指offer刷题笔记
2022要争气!!!!!!
2022FLAG不能倒!!!
展开
-
剑指offer刷题笔记
剑指offer两个栈实现队列class Solution{public: void push(int node) { stack1.push(node); } int pop() { int node; if(stack2.empty()) { while(!stack1.empty()) { stack2.push(stack1.top());//top表原创 2020-05-25 09:36:34 · 189 阅读 · 0 评论 -
剑指offer刷题笔记
剑指offer 重建二叉树#include<iostream>#include<vector>using namespace std;struct ListNode{ int val; struct ListNode *left; struct ListNode *right; ListNode(int x): val(x),left(NULL),right(NULL){}};ListNode * recon(vector原创 2020-05-22 21:49:43 · 202 阅读 · 0 评论