自学笔记
shimoVoaem
。
展开
-
cs-栈和队列
一、栈栈:先进后出-从上面进从上面出下层的要取出必须先取上层的队列:先进先出-先进的排到最后面,后进的在最前面,要出的话从后面出push(&S,x) 进栈pop(&S,x) 出栈顺序栈#define MaxSize 50 //定义栈中元素的最大个数typedef struct{ Elemtype data[MaxSize]; //存放栈中元素 int top; //栈顶指针top,初始S.top=-1原创 2020-11-03 18:03:45 · 322 阅读 · 1 评论 -
cs-单链表
单链表头插法(在头结点后面插入,最后的结果是逆序的)LinkList CreatList1(LinkList &L){ LNode *s;int x; L = (LinkList)malloc(sizeof(LNode)); //申请动态空间 L->next = NULL; //创建头结点 scanf("%d",&x); //输入节点的值 while(x != 9999){原创 2020-10-26 15:04:38 · 125 阅读 · 0 评论 -
Python条件语句、格式化语句、元组
Python第二天day-021.if条件语句的应用score = int(input("请输入分数:"))判断输入的分数,根据分数输入不同的状态if score >=90 and score <=100: print("优秀")elif score >=80 and score <90: print("良好")elif score >=...原创 2020-07-18 16:55:04 · 83 阅读 · 0 评论