- 博客(18)
- 资源 (6)
- 问答 (1)
- 收藏
- 关注
原创 数据结构-二叉树先序中序后序的非递归算法
#include#include#define MAX_SIZE 100using namespace std;typedef struct Node{ int data; struct Node *Lson,*Rson;}Node;void BulitTree(Node **node){ char a; cin>>a; if(a=='#') { *node=N
2017-09-25 23:25:06 594
原创 数据结构-二叉树的建立
二叉树的建立可通过 ab#d##c#e##这种形式建立说明: ROOT:a a的左儿子b a的右儿子c b无左儿子 b的右儿子d c无左儿子 c的右儿子e
2017-09-24 22:50:37 613
原创 数据结构-链队列的基本操作
#include#include#define OK 1#define ERROR 0using namespace std;typedef struct LNode{ int data; struct LNode *next;}LNode;typedef struct Queue{ LNode *front ,*rear;}Queue;void init_que
2017-09-22 16:06:51 947
原创 数据结构-栈的链式表示(指针双星问题**prt)
实现简单,主要是搞清楚,当指针作为参数的时候,如何在函数值对行参进行修改 st. 调用函数处传入的参数同时修改。#include#include#define OK 1#define ERROR 0using namespace std;typedef struct Stack_Node{ int data; struct Stack_Node *next;}Stack_N
2017-09-19 23:38:02 700
原创 数据结构-栈的静态顺序存储表示-初始化压栈弹栈
和上一个博客,动态方式一样#include#include#define MAX_STACKSIZE 100#define OK 1#define ERROR 0using namespace std;typedef struct sqstack{ int stack_array[MAX_STACKSIZE]; int top; int bottom;}SqStack;
2017-09-19 21:56:10 890
原创 数据结构-栈的动态顺序存储表示-初始化压栈弹栈
由于没有设置index参数,所以该code不能随时的输出,然后再继续进行push和pop,因为一次输出栈,就把top压到了bottom,可以通过增加index,进行恢复。#include#include#define STACK_SIZE 100#define STACKINCREMENT 10#define ERROR 0#define OK 1using namespace s
2017-09-17 12:56:56 781
原创 数据结构-双链表删除
依旧分文next(正向)和prior(逆向)两种:正向code:#include#includeusing namespace std;typedef struct Dulnode{ int data; struct Dulnode *prior,*next;}DulNode;DulNode *Input(int n){ DulNode *head,*p,*q;
2017-09-15 20:58:42 353
原创 数据结构-双向链表插入
分为正向序号插入数值和逆向序号插入数值正向code: #include #include using namespace std; typedef struct Dulnode { int data; struct Dulnode *prior,*next; }DulNode; DulNode *Input(int n) { DulNode *head,*
2017-09-15 20:42:12 743
原创 数据结构-双向循环链表
对输入的数据通过head分别进行双向的输出 #include #include using namespace std; typedef struct Dulnode { int data; struct Dulnode *prior,*next; }DulNode; DulNode *Input(int n) { DulNode *head,*p,*q;
2017-09-15 20:08:38 406
原创 数据结构-单链表的合并
#include#include#define OK 1#define ERROR 0using namespace std;typedef struct LNODE{ int data; struct LNODE *next;}Lnode;Lnode* Input(int n){ Lnode *head,*p,*q; head=p=(Lnode*)malloc(si
2017-09-13 17:38:30 919
原创 数据结构-单链表按值删除
#include#include#define OK 1#define ERROR 0using namespace std;typedef struct LNODE{ int data; struct LNODE *next;}Lnode;Lnode* Input(int n){ Lnode *head,*p,*q; head=p=(Lnode*)malloc(si
2017-09-13 17:07:18 4555
原创 数据结构-单链表按序号删除
#include#include#define OK 1#define ERROR 0using namespace std;typedef struct LNODE{ int data; struct LNODE *next;}Lnode;Lnode* Input(int n){ Lnode *head,*p,*q; head=p=(Lnode*)malloc(si
2017-09-13 17:00:47 826
原创 数据结构-单链表的插入
#include#include#define OK 1#define ERROR 0using namespace std;typedef struct LNODE{ int data; struct LNODE *next;}Lnode;Lnode *Input(int n){ Lnode *head,*p,*q; head=p=(Lnode*)malloc(si
2017-09-13 16:28:36 671
原创 数据结构-单链表查找按值查找
#include#include#define ERROR -40000using namespace std;typedef struct LNODE{ int data; struct LNODE *next;}Lnode;Lnode *Input(int n){ Lnode *head,*p,*q; head=p=(Lnode*)malloc(sizeof(Lno
2017-09-13 16:02:18 11233
原创 数据结构-单链表查找按序号查找
#include#include#define ERROR -40000using namespace std;typedef struct LNODE{ int data; struct LNODE *next;}Lnode;Lnode *Input(int n){ Lnode *head,*p,*q; head=p=(Lnode*)malloc(sizeof(Lno
2017-09-13 15:55:09 6533
原创 数据结构-单线新表链式尾插法
#include#includeusing namespace std;typedef struct LNODE{ int data; struct LNODE *next;}Lnode;Lnode* Input(int n){ Lnode *head,*p,*q; head=p=(Lnode*)malloc(sizeof(Lnode)); p->next=NULL;
2017-09-13 15:27:44 512
原创 数据结构-单线性链式-头插法
#include#include using namespace std;typedef struct Lnode{ int data; struct Lnode* next;}Linknode;int main(){ int n; while(cin>>n) { Linknode *head,*p; head=(Linknode*)malloc(size
2017-09-10 22:01:23 591
原创 数据结构-顺序线性表的初始化,插入,删除
#include#include#include#define MAX_SIZE 100 #define OK 1#define ERROR 0 using namespace std;typedef struct{ int* x; int length;}sqList;int init_sqList(sqList* L){ L->x=(int*)malloc(MAX
2017-09-10 21:32:18 1347
ELM能否直接训练阈值网络
2018-09-25
TCP拥塞控制算法慢启动,拥塞避免,快速重传,快速恢复
2018-06-02
模拟进程管理课设(FCFS,SJF,时间片轮转调度法)
2016-07-02
你的那个好像有一点问题
2015-05-07
TA创建的收藏夹 TA关注的收藏夹
TA关注的人