Data Structure
天上掉下来个程小白
专业程-小-白
展开
-
Data Structure——约瑟夫双向生死游戏
#include <stdio.h> #include <malloc.h> //循环双链表基本运算函数 typedef int ElemType; typedef struct Node //定义双链表结点类型 { ElemType data; struct Node *prior; //指向前驱结点 struct Node *next; //指向后继结点...原创 2020-01-12 11:17:16 · 653 阅读 · 0 评论 -
Data Structure——图的遍历
#include<iostream> using namespace std; #define MaxInt 40000 #define MVNum 100 #define true 1 #define OK 1 #define MAXQSIZE 100 #define OVERFLOW -1 #define ERROR 0 typedef int Status; typedef...原创 2020-01-12 11:15:45 · 210 阅读 · 0 评论 -
Data Structure——二叉树的遍历
#include<stdio.h> #include<iostream> #define TRUE 1 #define FALSE 0 #define OK 1 #define ERROR 0 #define OVERFLOW -1 using namespace std; typedef int Status; typedef char TElemType; typede...原创 2020-01-12 11:14:49 · 135 阅读 · 0 评论 -
Data Structure——KMP vs BF(串的应用:字符比较)
#include<stdio.h> #include<string.h> #define OK 1 #define ERROR 0 #define MAXLEN 300 typedef int Status; typedef char ElemType; typedef struct{ int next[MAXLEN+1]; int nextval[MAX...原创 2020-01-12 11:13:04 · 120 阅读 · 0 评论 -
Data Structure——舞伴问题(队列)
#include<bits/stdc++.h> using namespace std; #define OK 1 #define ERROR 0 #define TRUE 1 #define FLASE 0 //舞者名字,姓名结构体 typedef struct{ char name[20]; char sex; }Person; typedef int St...原创 2020-01-12 11:10:02 · 352 阅读 · 0 评论 -
Data Structure——四则运算(栈的运用)
#include<bits/stdc++.h> using namespace std; include<stdlib.h> //exit()的头文件 #define ERROR -1 #define OK 1 #define TRUE 1 #define FALSE 0 typedef char SElemType; typedef struct StackN...原创 2020-01-12 11:07:39 · 147 阅读 · 0 评论 -
Data Structure——学生信息管理系统(线性表,链表)
#include <stdio.h> #include <stdlib.h> #include <string.h> #define OK 1 #define ERROR 0 #define OVERFLOW -1 #define MAXSIZE 100 typedef int ElemType; typedef int Status; typedef st...原创 2020-01-12 11:05:13 · 323 阅读 · 0 评论