04 2020 档案
摘要:#include<algorithm> #include<string> #include<iostream> using namespace std; bool reword(string s) { string::iterator it1, it2; it1 = s.begin(); it2 =
阅读全文
摘要:#include<algorithm> #include<vector> #include<iostream> using namespace std; bool fun(vector<int> v, int& x) { vector<int> v1 = v; sort(v1.begin(), v1
阅读全文
摘要:SparseMatrix.h #pragma once #include<iostream> using namespace std; class Tri { public: int col; int row; int value; }; class SparseMatrix { public: i
阅读全文
摘要:SparsrMatrix.h #pragma once #include<iostream> using namespace std; class Tri { public: int row; int col; int value; }; class SparseMatrix { public: i
阅读全文
摘要:Stack.h #pragma once #include<iostream> using namespace std; class SNode { public: char data; SNode* next; }; class Stack { public: SNode* top; Stack(
阅读全文
摘要:原题是正整数的转换,只能练习到栈。但小数部分恰好是队列实现的,所以加上小数部分,可以一道题练习一整章的核心知识点 Stack.h #pragma once #include<iostream> using namespace std; class Stack { public: int* eleme
阅读全文
摘要:DoubleStack.h #pragma once #include<iostream> using namespace std; class DoubleStack { public: int* V; int top[2]; int maxSize; //由于题目没要求,就不写栈满处理函数了,数
阅读全文
摘要:LinkList.h #pragma once #include<iostream> using namespace std; class LNode { public: int data; LNode* next; }; class LinkList { public: LNode* first;
阅读全文
摘要:SeqList.h #pragma once #include<iostream> using namespace std; class SeqList { public: int* elements; int maxSize; int len; SeqList(int size = 30) { m
阅读全文
摘要:Stack.h #pragma once #include<iostream> using namespace std; class Stack { public: int* elements; int top; int maxSize; Stack(int size = 5) { maxSize
阅读全文
摘要:LinkQueue.h #pragma once #include<iostream> using namespace std; class QueueNode { public: int data; QueueNode* next; }; class LinkQueue { public: Que
阅读全文

浙公网安备 33010602011771号