自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(8)
  • 收藏
  • 关注

转载 中序线索二叉树的建立

#include<stdio.h> #include<stdlib.h>//中序建立二叉树 typedef struct node{ struct node *left,*right; int data; int rTag,lTag;}BNode;BNode* pre=NULL;//pre总是指向其前一个结点 ...

2019-05-19 21:48:00 554

转载 用二叉链表建立二叉树

1 #include<stdio.h> 2 #include<stdlib.h> 3 typedef struct node 4 { 5 int data; 6 struct node *l,*r; 7 8 }tree; 9 tree* Creattree(void)//层次建立二叉树 10 {...

2019-05-10 16:44:00 1691

转载 按顺序输入建立二叉树

二叉树的顺序存储是指用一组地址连续的存储单元依次自上而下、自左向右存储完全二叉树上的结点元素 1 #include<stdio.h> 2 #include<stdlib.h> 3 typedef struct btree 4 { 5 int data; 6 struct btree *right,*left; 7 ...

2019-05-10 16:03:00 2137

转载 用循环链表实现约瑟夫环

1 #include <stdio.h> 2 #include <stdlib.h> 3 typedef struct node{ 4 int number; 5 struct node * next; 6 }node; 7 node * initLink(int n){ 8 node * head=(...

2019-04-05 20:22:00 161

转载 最短路径----迪杰斯特拉算法解析

1 #include<stdio.h> 2 int map[1005][1005],vis[1005],dis[1005],min,n,m; 3 #define max 0x3f3f3f3f//这里表示无穷大,注意如果调用limits.h里面的INT_MAX,他会把这个当2147483647算; 4 void Dijkstra(int x)//这里用迪...

2019-03-25 20:59:00 124

转载 关于有头结点链表的创建算法及基础功能打的实现

这里是有头结点的链表创建: 1 #include<stdio.h> 2 #include<stdlib.h> 3 typedef struct Link 4 { 5 int data; 6 struct Link *next; 7 }lk;//定义lk为struct link类型; 8 ...

2019-03-08 20:21:00 220

转载 Jungle Roads(最小生成树计算最短路径)

2019-03-07 1 #include <bits/stdc++.h> 2 using namespace std; 3 #define max 0x3f3f3f3f//无穷大; 4 int tre[30][30],val[30],vis[30],n; 5 void prim()//本算法是采用prim来写最小生成树的,当然还有其他算法...

2019-03-07 21:17:00 118

转载 Message Decoding

简单的代码,希望大家加以指点一二#include <bits/stdc++.h>using namespace std;int main(){ char k[26],c; int i; for(i='a'; i<='z';i++) cin>>k[i]; getchar(); while((...

2019-02-13 16:34:00 148

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除