- 博客(8)
- 资源 (2)
- 问答 (1)
- 收藏
- 关注
转载 二叉树的建立选择等
#include #include #include using namespace std;//二叉树结点 typedef struct BiTNode{ //数据 char data; //左右孩子指针 struct BiTNode *lchild, *rchild;}BiTNode, *BiTree;//按先序序列创建二叉树 int Create
2017-06-23 15:01:31 117
转载 树与二叉树的转换
树转换为二叉树(1)加线。在所有兄弟结点之间加一条连线。(2)去线。树中的每个结点,只保留它与第一个孩子结点的连线,删除它与其它孩子结点之间的连线。(3)层次调整。以树的根节点为轴心,将整棵树顺时针旋转一定角度,使之结构层次分明。(注意第一个孩子是结点的左孩子,兄弟转换过来的孩子是结点的右孩子) 森林转换为二叉树(1)把每棵树
2017-06-21 16:53:05 155
原创 链表的重复删除/反转
remove dupliates from sorted list#include #include using namespace std;struct Node{ int data; struct Node *next; Node (int x) : data(x), next(nullptr) { }};Node* pra(Node* head){ if (head ==
2017-06-21 10:46:22 145
原创 链表的创建、及两链表反转相加!
#include#includeusing namespace std;typedef int T;typedef struct Node{ T value; Node* next; Node(T x) :value(x), next(NULL){ };}Node;//结点 Node* fun(Node *head){ T a; do{ cin >> a; No
2017-06-18 22:35:55 235
原创 创建链表
#include#includeusing namespace std;typedef int T;struct Node{ T value; Node* next; Node(T x) :value(x), next(NULL){ };//构造函数 类似于class中的构造函数};//结点int main(){ Node* head = NULL; cout << "inp
2017-06-16 16:08:08 145
原创 符号匹配问题
#include #include #include #include using namespace std;int main(){ string str; string left = "([{"; string right = ")]}"; stack st; int len = str.length(); while (cin >> str){ for (int i
2017-06-15 21:31:33 574
原创 判断组成回文的字符串序列
#include #include #include #include #include using namespace std;int main(){ vector strs; int n; string temp; cin >> n; for (int i = 0; i < n; i++){ cin >> temp; strs.push_back(temp);
2017-06-15 20:24:16 183
原创 化悲愤为力量
#include#include#includeusing namespace std;int main(){ vector vec; int n; string temp; while (cin >> n){ for (int i = 0; i < n; i++){ cin >> temp; vec.push_back(temp); } string st
2017-06-14 09:40:35 450
C 题库汇总 (1).xls
2020-03-26
C 题库汇总.xls
2020-03-26
QT显示灰度图像问题,显示出来为锯齿,求遇到曾遇到相同问题的同学施以援手啊
2017-07-28
TA创建的收藏夹 TA关注的收藏夹
TA关注的人