- 博客(7)
- 资源 (1)
- 收藏
- 关注
原创 单链型队列
#include<stdio.h> #include<malloc.h> typedef int TelemType; typedef struct Lnode { TelemType data; struct Lnode *next; } LNode; LNode *create_LinkList(void) { int data,ok=1; LNode *head,*p,*s; head=(LNode*)malloc(sizeof(L...
2021-06-19 21:19:39 106
原创 顺序表的创建与增加删除
#include<stdio.h> #include<malloc.h> typedef struct { int *j; }ai; void list(ai &a,int i,int u){ int *p,*q; int *newbase=(int*)realloc(a.j,11*sizeof(int)); q=&a.j[u-1]; for(p=&a.j[9];p>=q;--p)*(p+1)=*p; *q=i; ...
2021-06-18 20:57:22 64
原创 栈
#include<stdio.h> #include<malloc.h> typedef int TelemType; typedef struct Lnode { TelemType data; struct Lnode *next; } LNode; LNode *create_LinkList(void) { int data,ok=1; LNode ...
2020-04-13 21:59:59 87
原创 循环队列
#include<stdio.h> #include<malloc.h> #include<stdlib.h> #define max 10 typedef struct { int data[10]; int front,rear; }king,*zoo; int init(zoo q) { q->front=0; q->rear=0;...
2020-04-13 21:56:08 70
原创 链式寻找数组中的奇数并输出奇数中的最大值
#include<stdio.h> #include<malloc.h> #include<stdlib.h> typedef struct Lnode { int data; struct Lnode *next; }king; king *create_Linklist(void) { int data,ok=0; king *head,*p,*s...
2020-04-13 21:51:20 735
原创 冒泡排序的改进
#include<stdio.h> void main() { int a[10]; int i, j, t, w; int b[10][10]; for (i = 0; i < 10; i++) scanf("%d", &a[i]); for (j = 1; j < 10; j++) { for (w = 0; w < 9; w++) ...
2020-04-13 21:41:25 111 2
原创 树的先序遍历
这里写自定义目录标题 #树的先序遍历 10位数字构成的树通过层次发构建成数,然后通过先序的方式进行输出。 #include<stdio.h> #include<malloc.h> #include<stdlib.h> #define max 10 typedef struct love { char data; struct love *lchild,...
2020-04-05 15:49:50 228
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人