摘要:#include <iostream>using namespace std;struct PolyNode { int exp;//指数 int coef;//系数 PolyNode *next;};typedef PolyNode *PLinkList;PolyNode *getPrior(PL
阅读全文
摘要:#include <stdio.h>#include <stdlib.h>#include <iostream>using namespace std;#define INIT_SIZE 10struct circleQueue{ int *base; int front; int rear; };
阅读全文
摘要:#include <stdio.h>#include <stdlib.h>#include <iostream>using namespace std;struct qnode{int data;qnode *next;};struct linkqueue{qnode *front;qnode *r
阅读全文
摘要:【问题描述】按照要求完成顺序栈的设计 【输入形式】无【输出形式】20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 【样例输入】【样例输出】【样例说明】【评分标准】 #include <iostream>using namespace std;#in
阅读全文
摘要:#include <iostream>using namespace std;struct node {int data;node *next;};typedef node *LinkList;void createOList(LinkList &L,int m){node *p,*q,*r,*k;
阅读全文
摘要:【问题描述】已知某带头结点的单链表中存放着若干整数,请删除该单链表中元素在[x, y]之间的所有结点,要求算法的时间复杂度为O(n),空间复杂度为O(1)。 【输入形式】第一行:单链表中元素个数m 第二行:单链表中的m个整数 第三行:要删除的元素值所在区间[x,y]对应的x和y 【输出形式】 删除元
阅读全文