![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C++
Ftgn_dpA
这个作者很懒,什么都没留下…
展开
-
C++显示杨辉三角
利用循环队列的数据结构://"CirQueue.h"#include<iostream>using namespace std;template<class T>class CirQueue{ private: T *base; int front; int rear; int queuesize; public: CirQueue(int m); ~CirQueue(); void EnQueue(T x); T DeQueu原创 2020-12-13 01:40:01 · 163 阅读 · 0 评论 -
C++串逆置问题
#include<iostream>#include<string>#include<stack>using namespace std;//方法一:利用入栈出栈void StringReverse_1(string &str){ std::stack<char> sta; for (int i = 0; i < str.length(); i++) sta.push(str[i]); for (int j = 0; .原创 2020-12-13 01:25:57 · 356 阅读 · 0 评论 -
利用链表结构实现集合交运算
题目:利用链表数据结构计算集合A和集合B的交要求:数据元素为字符型,不开辟新的存储空间,即计算使用的链表头文件“LinkList.h”:#include<iostream>using namespace std;template<class T>struct Node{ T data; Node *next;};template<class T>class LinkList{private: Node<T> *Hea原创 2020-12-02 10:27:35 · 674 阅读 · 0 评论