Data Structure
AyiStar
这个作者很懒,什么都没留下…
展开
-
利用栈进行数制转换
/* 对于输入的任意一个非负十进制整数,打印输出与其等值的N进制,N由用户输入 */ #include"HeadFile.cpp" int Conversion( int num, int N ) ; int main() { int num_10, num_N, N ; scanf( "%d", &num_10 ) ; scanf( "%d", &N ) ; num_N = C原创 2016-04-13 23:06:42 · 685 阅读 · 0 评论 -
栈的实现
#include #include #include /* **状态返回值宏定义 */ typedef int Status ; #define TRUE 1 #define OK 1 #define FALSE 0 #define ERROR 0 #define INFEASIBLE -1 #define OVERFLOW -2 /***四则运算栈实现 */ #define ST原创 2016-04-13 22:33:30 · 211 阅读 · 0 评论 -
利用栈进行括号配对检验
Status Test( char *s ) ; int main() { char s[200] ; gets(s) ; if( Test(s) ) printf("OK\n") ; else printf("Wrong\n") ; return 0 ; } Status Test( char *s ) { Stack S ; char e ; InitStack(原创 2016-04-14 01:16:44 · 464 阅读 · 0 评论