- 博客(7)
- 收藏
- 关注
原创 链表第一二题
#include <stdio.h> #include <stdlib.h> #define false 0 #define true 1 typedef struct { int data; struct LNode *next; }LNode,*LinkList; LinkList List_HeadInsertv2(LinkList L) { int x; L=(LNode *)malloc(sizeof(LNode)); L
2021-07-24 20:40:40
104
原创 判断栈的操作是否合法
P66第三题 #include <stdio.h> #include <stdlib.h> #define true 1 #define false 0 _Bool Judge(char str[],int n) { int k=0,t=0; for(int i=0;i<n;i++) { switch(str[i]) { case 'I': k++;
2021-07-23 20:28:54
226
原创 实现HS火车按序输出
#include <stdlib.h> #include <stdio.h> #define MaxSize 50 #define true 1 #define false 0 typedef struct { char data[MaxSize]; int top; }SqStack; void IninStack(SqStack *S) { S->top=-1; } _Bool StackEmpty(SqStack *S) { if(S
2021-07-21 21:34:45
142
原创 用栈实现递归
#include <stdio.h> #include <stdlib.h> #define MaxSize 50 double p(int n,double x) { struct stack { int no; double val; }st[MaxSize]; int top=-1,i; double fv1=1,fv2=2*x; for(i=n;i>=2;i--) {
2021-07-21 21:13:11
389
原创 C语言利用栈实现括号匹配
C语言利用栈实现括号匹配 #include <stdlib.h> #include <stdio.h> #define MaxSize 50 #define true 1 #define false 0 typedef struct { char data[MaxSize]; int top; }SqStack; void IninStack(SqStack *S) { S->top=-1; } _Bool StackEmpty(SqStack *
2021-07-20 21:59:21
328
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人