![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数据结构实验
Mr_Qin_AC
这个作者很懒,什么都没留下…
展开
-
数据结构实验之链表一:顺序建立链表
# include<stdio.h># include<stdlib.h>struct node{ int data; struct node *next;}*head; struct node *creat(int n){ struct node *tail,*p; int i; head = (struct node*)malloc(si...原创 2018-09-27 10:56:53 · 336 阅读 · 0 评论 -
数据结构实验之链表二:逆序建立链表
#include<stdio.h>#include<stdlib.h>struct node{ int data; struct node *next;}*head;struct node *creat(int n){ struct node *p; int i; head = (struct node*)mall...原创 2018-09-28 17:06:33 · 334 阅读 · 0 评论 -
数据结构实验之链表三:链表的结点插入
#include<stdio.h>#include<stdlib.h>struct node{ int data; struct node *next;}*head;int len;void insert(int mi, int xi){ int i; struct node *p, *q; p = head; ...原创 2018-09-28 17:06:54 · 351 阅读 · 0 评论 -
链表的建立、查找、插入、删除
#include<iostream>#include<algorithm>#include<stdio.h>#include<malloc.h>#include<stack>using namespace std;typedef struct LNode{ int data; struct LNode *next;}...原创 2018-10-17 11:41:45 · 387 阅读 · 0 评论 -
数据结构实验---二叉排序树的创建
#include<stdio.h>#include<string.h>#include<algorithm>using namespace std;typedef struct node{ int key; struct node *l,*r;}bstnode;int bstinsert(bstnode *&p,int...原创 2018-10-27 08:54:03 · 813 阅读 · 0 评论 -
字符串插入块链实现——数据结构上机实验
1、相关类型说明#define chunksize 8#include "stdlib.h"#include "stdio.h"#include "string.h"typedef struct chunk{ char ch[chunksize]; structchunk *next;}chunk;//块链结点类型typedef struct{ chu...转载 2018-09-27 09:17:05 · 1099 阅读 · 0 评论 -
数据结构实验---栈和队列
#include<stdio.h>#include<stdlib.h>#define N 105int a[N];struct node{ int data; node *next;}*h;void LinkStack()//用链表实现栈{ node *s; int n; printf("请输入需要入栈元素的数量: "); scan...原创 2018-10-27 10:55:41 · 455 阅读 · 0 评论