摘要:
1.初始化 2.入队 3.出队 4.获取队首元素 5.判断队列是否为空 6.获取队列长度 7.遍历队列 8.销毁队列 9.清空队列(相对于销毁队列清空就是保留头结点,而销毁是彻底摧毁了,再也不能用了,清空,还可以使用) 代码: 1 #include<bits/stdc++.h> 2 using na 阅读全文
摘要:
1 #include<bits/stdc++.h> 2 using namespace std; 3 #define sc scanf 4 #define pr printf 5 6 typedef struct LNode 7 { 8 int data; 9 struct LNode *prior 阅读全文