上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 77 下一页
摘要: 先序遍历与中序遍历的代码实现是差不多的 只是把访问节点的操作放到了入栈操作前 代码实现: #include <stdio.h> #include <string.h> #include <stdlib.h> #define ElementType char int top = -1; //定义top 阅读全文
posted @ 2020-07-31 16:22 1点 阅读(676) 评论(1) 推荐(0)
摘要: 代码实现 : #include <stdio.h> #include <string.h> #include <stdlib.h> #define ElementType char int top = -1; //定义top栈顶元素下标 // 结点结构体 typedef struct BinTNod 阅读全文
posted @ 2020-07-31 16:12 1点 阅读(448) 评论(0) 推荐(0)
摘要: 这 3 种顺序 是按照 跟节点的 访问顺序来的 跟节点什么时候被访问 决定了 它是哪个遍历方式 1.先序 : A --> B -->D-->E-->C A是跟节点 BDE 是左节点 C是右节点 2.中序: 左中右 D-->B-->E-->A-->C BDE是左节点 A是中节点 C是右节点 3.后序 阅读全文
posted @ 2020-07-30 16:50 1点 阅读(631) 评论(0) 推荐(0)
摘要: 代码 : try { var urlhash = window.location.hash; if (!urlhash.match("fromapp")){ if ((navigator.userAgent.match(/(iPhone|iPod|Android|ios|iPad)/i))){ va 阅读全文
posted @ 2020-07-30 09:33 1点 阅读(529) 评论(0) 推荐(0)
摘要: 代码: <script type="text/javascript"> var system = { win: false, mac: false, xll: false }; var p = navigator.platform; system.win = p.indexOf("Win") == 阅读全文
posted @ 2020-07-29 17:53 1点 阅读(360) 评论(0) 推荐(0)
摘要: 代码 : // kmp 算法的实现: #include <stdio.h> #include <string.h> void Next(char*T,int *next){ int i=1; next[1]=0; int j=0; while (i<strlen(T)) { if (j==0||T[ 阅读全文
posted @ 2020-07-29 15:10 1点 阅读(638) 评论(0) 推荐(0)
摘要: 代码: #include <stdio.h> #include "stdlib.h" //宏定义 #define TRUE 1 #define FALSE 0 #define OK 1 #define ERROR 0 #define MAXSTRLEN 100 typedef char SStrin 阅读全文
posted @ 2020-07-24 17:32 1点 阅读(348) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2020-07-24 13:45 1点 阅读(163) 评论(0) 推荐(0)
摘要: p->next = q->next; p-next 原来是 q 现在变成 q->next 这个就是将 *q 从链中断开 代码: /*单链表(含头结点)*/ #include<stdio.h> #include<stdlib.h> typedef int ElemType; typedef struc 阅读全文
posted @ 2020-07-22 17:02 1点 阅读(568) 评论(0) 推荐(0)
摘要: 第一步: 先连接后链 原来 b = p->next 插入新节点后 b=s->next s->next = p->next; 第二步: 连接前链 p->next = s 代码: /*单链表(含头结点)*/ #include<stdio.h> #include<stdlib.h> typedef int 阅读全文
posted @ 2020-07-22 16:39 1点 阅读(493) 评论(0) 推荐(0)
上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 77 下一页