会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
tong1487
博客园
首页
新随笔
联系
订阅
管理
2014年10月9日
静态链表
摘要: #include#include#include#include#define maxsize 100using namespace std;typedef struct{ char data; int next;//游标代替指针}staticlist[maxsize];//建立静态链表...
阅读全文
posted @ 2014-10-09 17:55 tong1487
阅读(186)
评论(0)
推荐(0)
2014年10月8日
栈的顺序存储和基本实现
摘要: #include#include#include#define maxsize 1000using namespace std;//顺序结构typedef struct { int data[maxsize]; int top;}SqStack;//初始化栈void initStack(...
阅读全文
posted @ 2014-10-08 17:54 tong1487
阅读(157)
评论(0)
推荐(0)
2014年10月6日
树以及树的存储结构
摘要: //树的存储结构//双亲存储结构typedef struct{ int data;//结点的值 int parent;//指向双亲位置的伪指针} PTree[maxsize];//孩子存储结构typedef struct node{ int data;//结点的值 struct node *sons...
阅读全文
posted @ 2014-10-06 14:56 tong1487
阅读(216)
评论(0)
推荐(0)
2014年10月5日
链表
摘要: #include#include#includeusing namespace std;typedef struct LNode{ int data; struct LNode *next;}Linklist;void creatF(Linklist *&L,int a[],int n)...
阅读全文
posted @ 2014-10-05 01:41 tong1487
阅读(132)
评论(0)
推荐(0)
枚举算法
摘要: 1.枚举法的基本思想:根据实际问题设计多重循环,一一枚举所有可能的状态,并用问题给定的约束条件检验哪些状态是需要的,哪些状态是不需要的。能使命题成立的状态,即为其解。虽然枚举法本质上属于搜索策略,但是它与后面讲的回溯法或宽度优先搜索有所不同。2.枚举条件:①可预先确定每个状态的元素个数n。如百钱买百...
阅读全文
posted @ 2014-10-05 01:36 tong1487
阅读(516)
评论(0)
推荐(0)
公告