![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数据结构
MJlucy
这个作者很懒,什么都没留下…
展开
-
一元多项式的加法与乘法
我只写了加法......乘法以后有空补上(可能补不上了>_<)#include <stdio.h> #include <stdlib.h> typedef struct Node* Polynode; struct Node { int c; int e; Polynode Link; }; Polynode Read(); void Attac...原创 2018-03-14 20:30:20 · 257 阅读 · 0 评论 -
单链表逆转问题
断断续续写了好长时间,卡住了好几次,这个问题还是比较重要的,以后再多看看,理解理解吧。题目要求:Given a constant K and a singly linked list L, you are supposed to reverse the links of every K elements on L. For example, given L being 1→2→3→4→5→6, ...转载 2018-03-18 17:00:17 · 345 阅读 · 0 评论 -
两个有序链表序列的合并
输入样例:3 1 3 5 5 2 4 6 8 10 输出样例:1 2 3 4 5 6 8 10 NULL NULL#include <stdio.h> #include <stdlib.h> typedef int ElementType; typedef struct Node *PtrToNode; struct Node { Ele...转载 2018-03-13 20:40:18 · 191 阅读 · 0 评论 -
栈和队列的基本操作
整理的一些栈和队列的基本操作,废话不多说,上代码//数组实现栈 #define MaxSize typedef struct SNode *Stack; struct SNode { int top; ElementType Data[MaxSize]; }; void Push(Stack S,ElementType item) { if(S->top=MaxSize-1){ ...原创 2018-03-20 22:08:24 · 236 阅读 · 0 评论