
数据结构项目
文章平均质量分 81
数据结构小项目
䔴䔴䔴
计算机底层人员
展开
-
查找和排序小项目
#include<iostream>using namespace std;#define max 10typedef struct{ int num,score1,score2;//学号,数据结构成绩,程序设计成绩 string name;}one;typedef struct{ one information[max+1];//最大存储学生信息个数 int sum;//学生总数...等信息}student;//学生总的void out...原创 2021-08-08 14:05:49 · 86 阅读 · 0 评论 -
图的小项目
#include<iostream>using namespace std;#define max 32867#define mvm 100typedef int elemtype;int visit[mvm];typedef struct xx{ elemtype vexs[mvm]; int arcs[mvm][mvm]; int vexnum, arcnum;}amgraph;typedef struct zz{ elemtyp...原创 2021-08-08 14:04:40 · 86 阅读 · 0 评论 -
二叉树的小项目
#include<iostream>using namespace std;typedef struct bitnode{ char ch; bitnode* lchild, * rchild;}tree, * bitree;void createtree(bitree& t){ char m; cin >> m; if (m == '#')//输入#则是空 { t = NULL; }...原创 2021-07-29 12:20:18 · 170 阅读 · 0 评论 -
队列实现医院候诊就诊菜单
#include<iostream>using namespace std;#define maxsize 7typedef struct{ string name; int num;}elemtype;typedef struct quee{ elemtype * people; int front; int rear;}quee;void initialquee(quee& q){ q.people = ne...原创 2021-07-24 09:49:09 · 361 阅读 · 0 评论 -
栈的功能实现的小项目
#include<iostream>using namespace std;# define max 10typedef struct stack{ int* base; int* top; int stacksize;}stack;void innitialstack(stack& s){ s.base = s.top = new int[max+1]; s.stacksize = max; if (s.base) ...原创 2021-07-24 09:47:28 · 140 阅读 · 0 评论 -
单链表项目
#include<iostream>#include<stdlib.h>using namespace std;typedef int elemtype;typedef int status;typedef struct node{ elemtype elem; node* next;}lnode ,*linklist;void menu1();//申明链表菜单函数status initiallist(linklist& l){...原创 2021-07-13 18:12:49 · 160 阅读 · 0 评论 -
顺序表小项目
#include<iostream>#include<stdlib.h>using namespace std;typedef int elemtype;typedef int status;#define maxsize 15typedef struct{ elemtype* elem; int length;}sqlist;void menu();//申明顺序表菜单函数status initiallist(sqlist& l)...原创 2021-07-13 18:10:53 · 135 阅读 · 0 评论