![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数据结构
qq_38876046
这个作者很懒,什么都没留下…
展开
-
二叉树递归的创建及三种遍历(先序、中序、后序)
#include #include #include #include using namespace std; #define status int typedef struct bitnode { int data; struct bitnode *lchild; struct bitnode *rchild; } bitnode,*sq; int r=0; bit原创 2017-10-13 19:12:54 · 531 阅读 · 0 评论 -
(搜索)POJ-1979 Red and Black
There is a rectangular room, covered with square tiles. Each tile is colored either red or black. A man is standing on a black tile. From a tile, he can move to one of four adjacent tiles. But he can'...原创 2018-03-24 14:24:34 · 113 阅读 · 0 评论 -
顺序表
#include #include #include #include using namespace std; #define sizelist 100 #define listincrease 10 #define error -1 #define ok 0 typedef struct { int *data; int length; int listsize; }原创 2017-11-24 20:37:20 · 134 阅读 · 0 评论 -
二叉树求叶子数、树的高度
#include #include #include #include using namespace std; #define status int typedef struct bitnode { char data; struct bitnode *lchild; struct bitnode *rchild; } bitnode,*sq; int r=0; bitnode *q; i原创 2017-10-16 14:06:07 · 397 阅读 · 0 评论 -
直接插入排序
#include #include #include using namespace std; typedef struct { int *r; int length; } sqlist; void createlink(sqlist &L) { int n; L.length=0; cout<<"输入链表长度:"<<endl; cin>>n;原创 2017-11-22 20:14:16 · 138 阅读 · 0 评论 -
折半排序
#include #include #include using namespace std; typedef struct { int *r; int length; } sqlist; void createlink(sqlist &L) { int n; L.length=0; cout<<"输入链表长度:"<<endl; cin>>n;原创 2017-11-22 20:10:02 · 216 阅读 · 0 评论 -
快速排序
#include #include #include using namespace std; typedef struct { int *r; int length; } sqlist; void createlink(sqlist &L) { int n; L.length=0; cout<<"输入链表长度:"<<endl; cin>>n;原创 2017-11-22 20:02:37 · 150 阅读 · 0 评论 -
希尔排序
#include #include #include using namespace std; typedef struct { int *r; int length; } sqlist; void createlink(sqlist &L) { int n; L.length=0; cout<<"输入链表长度:"<<endl; cin>>n;原创 2017-11-22 19:52:44 · 218 阅读 · 0 评论 -
堆排序
#include #include #include using namespace std; typedef struct { int *r; int length; }sqlist; void createlink(sqlist &L) { int n; L.length=0; cout<<"输入链表长度:"<<endl; cin>>n;原创 2017-11-22 19:36:25 · 194 阅读 · 0 评论 -
循环链表应用之约瑟夫环
#include #include #include using namespace std; typedef struct node { char data; struct node *next; }slink,*ad; ad createlink(slink *head) { slink *p,*s; int n; cout<<"输入链表长度:"<<en原创 2017-11-15 17:29:14 · 276 阅读 · 0 评论 -
循环链表
#include #include #include using namespace std; typedef struct node { int data; struct node *next; }slink,*ad; ad createlink(slink *head) { slink *p,*s; int n; cout<<"输入链表长度:"<<end原创 2017-11-12 20:56:00 · 122 阅读 · 0 评论 -
二叉树非递归层次遍历
#include #include #include #include using namespace std; #define status int typedef struct node { int data; struct node *next; struct node *lchild; struct node *rchild; struct node *front; struc原创 2017-10-16 09:32:36 · 238 阅读 · 0 评论 -
二叉树非递归遍历之中序遍历
#include #include #include #include using namespace std; #define status int typedef struct bitnode { char data; struct bitnode *next; struct bitnode *lchild; struct bitnode *rchild; }linkstack,*sq原创 2017-10-14 20:01:35 · 148 阅读 · 0 评论 -
(搜索应用)Oil Deposits( UVA - 572 )
Oil Deposits UVA - 572 #include <iostream> #include<stdio.h> #include<queue> #include<stdlib.h> #include<string.h> using namespace std; char a[100][100]; int vis[100][100...原创 2018-04-15 19:12:14 · 109 阅读 · 0 评论