2017年1月18日

顺序栈的相关操作(初始化、入栈、出栈)

摘要: #include < iostream > using namespace std; #define stack_size 10 int stack[stack_size]; int top = 0; void Init_Stack() //初始化顺序栈 { top = -1; } void pus 阅读全文

posted @ 2017-01-18 17:00 小调~ 阅读(5855) 评论(0) 推荐(0) 编辑

双向链表的相关操作(创建、顺序遍历、逆序遍历、逆序查找、删除、插入、非递减排序)

摘要: 1 #include<iostream> 2 using namespace std; 3 4 struct node //建立拥有next和prior指针的结构体 5 { 6 int data; 7 struct node *prior, *next; 8 }; 9 10 node* Init_L 阅读全文

posted @ 2017-01-18 16:56 小调~ 阅读(1358) 评论(0) 推荐(0) 编辑

单链表的相关操作(创建、插入、删除、查找、非递减排序、逆置)

摘要: 1 #include 2 using namespace std; 3 struct node //建立一个结构体 4 { 5 int data; 6 struct node *next; 7 }; 8 9 node* InitList(int n, struct node *list) //建立单链表 10 { 11 ... 阅读全文

posted @ 2017-01-18 16:51 小调~ 阅读(660) 评论(0) 推荐(0) 编辑

导航