- 博客(3)
- 收藏
- 关注
原创 冒泡、选择、插入、希尔、快速、归并排序
c语言冒泡、选择、插入、希尔、快速、归并排序 #include<iostream> using namespace std; int getlength(int a[]); void insertion(int a[]); int a[] = { 3,42,54,2312,312345,235423,5346,6356,6353,346,34,346,534,354,1 }; void insertion(int a[]) { int i, j; int key; for (j =
2022-03-29 00:59:51
1309
原创 二叉树的遍历算法,递归和非递归;
//树的一些非递归算法 #include<iostream> using namespace std; #include<stack> #include<queue> typedef struct node{ char data; struct node* lchild, * rchild; }node, *bitree; bitree buildtree() { struct node* p = (struct node*)malloc(sizeof(st.
2021-10-14 00:56:19
52
2
原创 单链表的反转
#include<iostream> using namespace std; typedef struct node { int data; struct node* next; }list, *linklist; //链表的初始化 linklist init() { linklist l = (struct node*)malloc(sizeof(struct node)); l->next = NULL; return l; } //建立链表 void creat(li
2021-10-12 01:25:01
52
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人