自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(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

原创 静态断言 #include &lt;stdio.h&gt; #include&lt;assert.h&gt; #include&lt;iostream&gt; //断言:迅速找到 using namespace std; #define N 10 voi... 2018-05-16 18:05:42 阅读数 87 评论数 0 原创 C++多线程 C11中采用thread实现多线程#include &lt;thread&gt; #include&lt;iostream&gt; #include&lt;windows.h&gt; #include&lt;vector&gt; /... 2018-05-16 17:40:52 阅读数 35 评论数 0 原创 智能指针

2020-03-26

C 题库汇总.xls

leetcode 刷题 /*46.全排列给定一个没有重复数字的序列,返回其所有可能的全排列。回溯大法!!*/void dfs(vector&lt;int&gt;&amp; nums, int curSize,vector&lt;vector&lt;int&gt;&gt;&amp; res, vector&lt;int&gt; &amp;vec, map&lt;int, int&gt;&amp; visited){... 9次阅读2019-12-20 11:40:50 友元函数 //友元函数:可以访问类的私有数据成员和私有函数。 友元函数声明有friend,但定义不需要。#include &amp;lt;iostream&amp;gt;#include &amp;lt;cstring&amp;gt;using namespace std;class persion{public: persion(char *pn); //友元函数; friend voi... 736次阅读2018-05-18 16:18:24

2020-03-26

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除