#include <stdio.h>#include <stdlib.h>#include <string.h> struct node{ int data; struct node *pNext;}; void insertTail(struct node *pH,struct node *new ...
分类:
其他好文 时间:
2019-10-05 20:18:33
阅读次数:
84
#include <stdio.h>#include <stdlib.h>#include <string.h> struct node{ int data; struct node *pNext;}; void insertTail(struct node *pH,struct node *new ...
分类:
其他好文 时间:
2019-10-05 20:00:56
阅读次数:
93
#include <stdio.h>#include <stdlib.h>#include <string.h> struct node{ int data; struct node *pNext;}; void insertTail(struct node *pH,struct node *new ...
分类:
其他好文 时间:
2019-10-05 18:13:02
阅读次数:
77
#include <stdio.h>#include <stdlib.h>#include <string.h>struct node{ int data; struct node *pNext;};void insertTail(struct node *pH,struct node *new){ ...
分类:
其他好文 时间:
2019-10-05 12:52:42
阅读次数:
100
一.线性表的逆置算法( a[ 1] ..... a[ n ]) 逆置为( a[ n ] ...... a[ 1 ]) (1)一维数组作存储结构 (2)单链表作为存储结构 二.二叉树:知道前序遍历、中序遍历、后序遍历任意两种即可求出该棵二叉树的形态。 三.求二叉树高度的算法: 四.判断循环队列是否满的 ...
分类:
其他好文 时间:
2019-10-04 22:52:46
阅读次数:
170
队列与栈一样是一种线性集合,队列与栈的不同之处在于,队列需要在两端进行操作,在用链表实现的队列中,需要在表头和表尾进行操作。 思考一下,在链表实现的队列中,入队和出队操作在表头和表尾进行有什么差异?(假设链表为单链表,head指向链表头节点,end指向链表尾节点) 先考虑入队操作,入队操作在链表头和 ...
分类:
其他好文 时间:
2019-10-04 20:46:44
阅读次数:
95
插入节点图解 s->next = p->next; p->next = s; 创建节点 1 typedef struct Lnode 2 { 3 ElemType data; 4 struct Lnode * next; 5 } Lnode,*LinkList; 单链表的进本操作 1.创建链表 1 ...
分类:
其他好文 时间:
2019-10-04 13:32:02
阅读次数:
90
编写一个程序,找到两个单链表相交的起始节点。如下面的两个链表 : 在节点 c1 开始相交。 输入:intersectVal = 8, listA = [4,1,8,4,5], listB = [5,0,1,8,4,5], skipA = 2, skipB = 3 输出:Reference of th ...
分类:
其他好文 时间:
2019-10-03 10:55:45
阅读次数:
82
单链表引入 顺序表 理解Python变量的本质: 变量存储的不是值,是值的地址 理解Python的 "="表示的是 指向 关系 案例: 交换a,b的值, a=10, b=20 a, b = 20, 10 t0: a这块内存(也有id), 存储的是10这个值的地址(可能是0x111), b存储的是20 ...
分类:
编程语言 时间:
2019-10-02 16:56:07
阅读次数:
77
题目描述 输入两个单调递增的链表,输出两个链表合成后的链表,当然我们需要合成后的链表满足单调不减规则。 解题思路 链表基础操作考察,难点在于对于输入数据的把握,一定要考虑输入数据的全面性 1.出现单链表为NULL; 2.两个链表都为NULL; 3.一个链表遍历完成,另一链表还有剩余的节点 4.两个链 ...
分类:
其他好文 时间:
2019-10-01 22:19:56
阅读次数:
94