随笔分类 -  数据结构

孤独的运货员
摘要:先附上题目要求:下面附上数据结构框图,本人整理(勿喷!)在解题的时候用到了栈和队列,其中货车FILO用到了栈的结构,各国运货平台FIFO用到了队列结构,动态分配各运货平台,其实题目读懂之后模拟整个运货平台分理过程也没有那么难,关键是做好数据结构!下面附上代码: 1 #include 2 #in... 阅读全文

posted @ 2014-05-20 09:43 Karma_wjc 阅读(316) 评论(0) 推荐(0)

[栈和队列]飞机场调度
摘要:一开始题意理解错误,于是就有了下面的字符串版,输出的时候将1转换为0001,下面附上代码 1 #include 2 #include 3 #include 4 typedef int ElemType; 5 6 typedef enum 7 { 8 false , t... 阅读全文

posted @ 2014-05-06 15:01 Karma_wjc 阅读(603) 评论(0) 推荐(0)

【线性表】一元多项式相乘
摘要:1 /* PRESET CODE BEGIN - NEVER TOUCH CODE BELOW */ 2 3 #include 4 #include 5 6 typedef struct node 7 { int coef, exp; //coe... 阅读全文

posted @ 2014-05-01 11:06 Karma_wjc 阅读(200) 评论(0) 推荐(0)

工科楼北面的那个坑
摘要:1 #include 2 #include 3 4 typedef struct mdata 5 { 6 int *pTime; 7 int width; 8 int hight; 9 struct mdata *pre; 10 st... 阅读全文

posted @ 2014-05-01 11:03 Karma_wjc 阅读(168) 评论(0) 推荐(0)

[栈和队列]从中缀向后缀转换表达式
摘要:1 #include 2 #include 3 #include 4 #define INIT_STACK_SIZE 100 5 typedef struct 6 { 7 char * chOperator; 8 int dwtop; 9 }OPND;10 11 void I... 阅读全文

posted @ 2014-05-01 11:02 Karma_wjc 阅读(186) 评论(0) 推荐(0)

[栈和队列]括号匹配
摘要:1 #include 2 #include 3 #include 4 #define INIT_STACK_SIZE 100 5 typedef struct 6 { 7 char * chOperator; 8 int dwtop; 9 }OPND;10 11 void I... 阅读全文

posted @ 2014-05-01 11:01 Karma_wjc 阅读(219) 评论(0) 推荐(0)