随笔分类 -  algorithm

algorithm
摘要:算法 输出结果 阅读全文
posted @ 2019-08-14 23:55 wjwdive 阅读(237) 评论(0) 推荐(0) 编辑
摘要:```C #ifndef LINKSTACK_H_INCLUDED #define LINKSTACK_H_INCLUDED #include #include //链式栈的结点 typedef struct LINKNODE { struct LINKNODE *next; }LinkNode; //链式栈 typedef struct LINKSTACK { Lin... 阅读全文
posted @ 2019-08-09 07:49 wjwdive 阅读(980) 评论(0) 推荐(0) 编辑
摘要:```C /* * SeqStack.h * * Created on: 2019年8月1日 * Author: Administrator */ #ifndef SEQSTACK_H_ #define SEQSTACK_H_ //数组去模拟栈的顺序存储, 有数组的后面模拟栈顶 ,避免数据频繁移动 #define MAX_SIZE 1024 #define SEQ_S... 阅读全文
posted @ 2019-08-09 07:48 wjwdive 阅读(437) 评论(0) 推荐(0) 编辑
摘要:```C /* * Josephus.c * * Created on: 2019年7月25日 * Author: Administrator */ #include "CycleLinkList.h" #include #include #include #define M 8 #define N 3 typedef struct MYNUM { CircleLinkNode node; int 阅读全文
posted @ 2019-08-09 07:39 wjwdive 阅读(320) 评论(0) 推荐(0) 编辑
摘要:按照单链表的设计,稍加改动。和单向链表不一样的地方,头节点不指向NULL,而是指向自己head 循环链表的判满 1)判断next是不是头结点,2)判断size 阅读全文
posted @ 2019-08-09 07:37 wjwdive 阅读(3374) 评论(0) 推荐(0) 编辑
摘要:```C /* * LinkList.h * * Created on: 2019年7月20日 * Author: Administrator */ #ifndef SRC_LINKLIST_H_ #define SRC_LINKLIST_H_ #include #include //链表节点 typedef struct LINKNODE { void *data... 阅读全文
posted @ 2019-07-21 00:49 wjwdive 阅读(256) 评论(0) 推荐(0) 编辑
摘要:```C /* * LinkList.h * * Created on: 2019年7月20日 * Author: Administrator */ #ifndef SRC_LINKLIST_H_ #define SRC_LINKLIST_H_ #include #include /** * 企业链表的实现 */ //链表小结点 和普通链表相比较 没有数据... 阅读全文
posted @ 2019-07-21 00:47 wjwdive 阅读(561) 评论(2) 推荐(0) 编辑
摘要:算法题目:有两个字符串由不同的字母组成,一长一短,长的为A短的为B。设计一个算法,如果所有在B中出现的字符都在A中出现,则返回true,否则返回false。 如下字符串: 字符串A: abddfdioegdddffsfagj 字符串B: dofsjadg 字符串B中每个字符都在A中出现,返回true 阅读全文
posted @ 2018-06-08 12:11 wjwdive 阅读(376) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示