堆排序,要从初始状态调整成大顶堆,然后每次取出顶(此时顶是最大的),用最后一个元素代替顶,再接着排序。#define LOCAL#include#include#includeusing namespace std;typedef int ElemType;const int maxSize=10;...
分类:
编程语言 时间:
2014-10-10 17:43:44
阅读次数:
199
#include#include#include#include#define maxsize 100using namespace std;typedef struct{ char data; int next;//游标代替指针}staticlist[maxsize];//建立静态链表...
分类:
其他好文 时间:
2014-10-09 22:20:07
阅读次数:
169
#include using namespace std;#define MaxSize 25typedef int DataType;class SeqList{ DataType list[MaxSize]; int length; public: SeqList(){length ...
分类:
其他好文 时间:
2014-10-09 22:18:17
阅读次数:
202
#include #define maxsize 5000char buf[maxsize];char *head = buf;char *new(int size){ //分配元素字长 //可用内存分配完毕 if (maxsize - (buf - head) < size) return ...
分类:
其他好文 时间:
2014-10-09 22:14:27
阅读次数:
173
#include#include#include#define maxsize 1000using namespace std;//顺序结构typedef struct { int data[maxsize]; int top;}SqStack;//初始化栈void initStack(...
分类:
其他好文 时间:
2014-10-09 01:30:27
阅读次数:
280
#define LOCAL#include#include#includeusing namespace std;typedef int ElemType;const int maxSize=10;//传入函数的一维数组经过函数之后数组元素发生变化 int REV(int *a,int x,int ...
分类:
其他好文 时间:
2014-10-09 00:59:27
阅读次数:
356
//树的存储结构//双亲存储结构typedef struct{ int data;//结点的值 int parent;//指向双亲位置的伪指针} PTree[maxsize];//孩子存储结构typedef struct node{ int data;//结点的值 struct node *sons...
分类:
其他好文 时间:
2014-10-06 17:07:30
阅读次数:
190
1、创建数据表空间: create tablespace rusky_data login datafile 'D:rusky\rusky_data01.dbf' size 10m ---指定表空间大小 autoextend on; ---设置空间自增长 next 50m maxsize 10...
分类:
数据库 时间:
2014-10-05 00:36:27
阅读次数:
242
#define LOCAL#include #include #include #define OK 1#define ERROR 0#define TRUE 1#define FALSE 0#define ElemType int#define MAXSIZE 100 /*此处的...
分类:
其他好文 时间:
2014-09-30 19:00:59
阅读次数:
306
完整代码如下: 1 #include 2 #include 3 #include 4 using namespace std; 5 typedef int datatype; 6 const int maxsize = 100; 7 struct seqQueue 8 { 9...
分类:
其他好文 时间:
2014-09-29 20:14:11
阅读次数:
195