本题要求在一个数组中实现两个堆栈。 其中Tag是堆栈编号,取1或2;MaxSize堆栈数组的规模;Stack结构定义如下: 注意:如果堆栈已满,Push函数必须输出“Stack Full”并且返回false;如果某堆栈是空的,则Pop函数必须输出“Stack Tag Empty”(其中Tag是该堆栈
分类:
编程语言 时间:
2016-03-21 09:23:19
阅读次数:
234
#include<stdio.h>
#include<assert.h>
#include<string.h>
//顺序表的静态存储
#defineMAXSIZE5
typedefintDataType;
typedefstructSeqList
{
DataTypearray[MAXSIZE];//数组大小
size_tsize;//有效元素个数
}SeqList;
voidInitSeqList(SeqList*Pseq);
void..
分类:
其他好文 时间:
2016-03-20 18:09:30
阅读次数:
271
void Fibonacci(int *f) { f[0] = 1; f[1] = 1; for (int i = 2; i < MAXSIZE; i++) { f[i] = f[i - 1] + f[i - 2]; } } int Fibonacci_Search(int *a, int n, i
分类:
其他好文 时间:
2016-02-29 16:08:47
阅读次数:
183
#define_CRT_SECURE_NO_WARNINGS1
#include<stdio.h>
#include<stdlib.h>
#include<assert.h>
#include<string.h>
#defineMAXSIZE1000
typedefintDateType;
typedefstructSeqList
{
DateTypearr[MAXSIZE];
size_tsize;
}SeqList;
//打印静态顺序表..
分类:
编程语言 时间:
2016-02-19 01:47:18
阅读次数:
274
package com.util.MyStack;public class MyStack { private int maxSize; private long[]stackArray; private int top; public MyStack(int s){ maxSize = s; st
分类:
其他好文 时间:
2016-02-16 16:46:04
阅读次数:
123
1 #include<stdio.h> 2 #include<stdlib.h> 3 4 typedef int Elemtype; 5 #define MAXSIZE 20 6 7 typedef struct List{ 8 Elemtype data[MAXSIZE]; 9 int lengt
分类:
其他好文 时间:
2016-02-04 18:49:35
阅读次数:
258
1 #include<stdio.h> 2 #include<stdlib.h> 3 4 //typedef 80 MAXSIZE; 5 #define MAXSIZE 20 6 7 typedef struct Node{ 8 int data; 9 int cursor; 10 }Node,St
分类:
其他好文 时间:
2016-02-04 18:44:41
阅读次数:
320
利用七牛云私有空间存储文件第一步,注册七牛云,创建空间,将空间设为私有需要记下的东西:AK,SK,bucket第二步配置ThinkPHP在config.php添加 'UPLOAD_SITEIMG_QINIU'=>array( 'maxSize'=>5*1024*1024,//文件大小 'rootPa
分类:
Web程序 时间:
2016-01-29 20:33:09
阅读次数:
351
1.创建表空间 create tablespace yyy datafile '/u01/oracle/oradata/orcl/yyy01.dbf' size 50m autoextend on next 50m maxsize unlimited extent management local
分类:
数据库 时间:
2016-01-29 11:44:16
阅读次数:
240
Problem Description输入n(n 2 #define maxsize 100 3 int qiuzuixiao(int a[],int n){ 4 int min=*a; 5 int k=0; 6 for(int i=1;ia[i]){ 8 ...
分类:
其他好文 时间:
2016-01-27 14:22:21
阅读次数:
114