- 博客(4)
- 收藏
- 关注
原创 移动jd
输入无序的元素,分别建立两个有3个元素结点的有序单链表(无头结点)(显示排序后的链表), 交换两个单链表的第二个结点(注意不能采取直接赋值的方式,要进行结点的移动), 最后显示链表中元素。 样例输入 6 4 5 2 1 3 样例输出 4 5 6 1 2 3 4 2 6 1 5 3 #include<stdio.h> #include<malloc.h> typedef struct Node { char data; struct Node * next; }Node, *Lin
2021-01-20 10:54:56 396
原创 【L自o用】
头插 #include<stdio.h> #include<malloc.h> typedef struct Node { char data; struct Node * next; }Node, * LinkList; LinkList CreateFromHead() { LinkList L; Node *p; char c; L = (LinkList)malloc(sizeof(Node)); L->next = NULL; c = getc
2021-01-19 14:17:05 145
原创 一些树的自用基操-yztpk
#include<stdio.h> #include<malloc.h> #define DataType char typedef struct Node { DataType data; struct Node *LChild; struct Node *RChild; }BiTNode, *BiTree; void CreateBiTree(BiTree *bt)//前序建立 { DataType ch; ch = getchar(); if(ch == '.
2021-01-06 00:38:23 88
原创 ThBTree _未补全-yztpk
树的中序线索化(前驱、后继、遍历)-自用 #include<stdio.h> #include<malloc.h> #define DataType char typedef struct Node { struct Node* LChild; int Ltag; struct Node* RChild; int Rtag; DataType data; }BiTNode, *BiTree; BiTree pre = NULL; void CreateBiTree(
2021-01-06 00:23:55 78
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人