数据结构
我不是写算法我在创造世界
这个作者很懒,什么都没留下…
展开
-
二叉树递归与非递归的广度优先与深度优先及树的深度C语言实现
先是生成了一个.h文件方便后面使用 typedef struct BinaryTree{ char data; struct BinaryTree* left; struct BinaryTree* right; }BinaryTree; typedef struct Tree{ struct BinaryTree* tree; int nodenums; }Tree; Tree* createBinaryTree(){ Tree* tree = (Tree*)malloc(sizeof(Tre原创 2021-08-01 04:23:33 · 222 阅读 · 1 评论 -
数据结构-链表队列C语言实现
不是很完善,没有释放多余空间,以及逻辑性也不是很严谨,有机会再改 #include<stdio.h> #include<stdlib.h> typedef struct Node{ char data; struct Node* next; }LNode,*LinkList; LinkList createNode(); bool Push(LinkList &tail,char c); char Pop(LinkList &head); void Print(原创 2021-07-28 10:27:19 · 75 阅读 · 0 评论 -
数据结构-单向链表栈C语言实现
/* 待定 */ #include<stdio.h> #include<stdlib.h> typedef struct Node{ char data; struct Node* next; }LNode,*LinkList; LinkList createNode(); bool Push(LinkList &head,char c); char Pop(LinkList &head); void Print(LinkList head); int m.原创 2021-07-28 08:37:12 · 54 阅读 · 0 评论 -
数据结构-链表字典树实现(单词查找树,Trietree)C语言
字典树的相关概念请查找其他资料,不再累述 #include<stdio.h> #include<stdlib.h> #include<string.h> typedef struct Node{ char data; struct Node* next[26]; }LNode,*LinkList; LinkList CreateHead(); LinkList AddData(LinkList head,char* word); bool FindWord(LinkL原创 2021-07-27 16:03:37 · 202 阅读 · 0 评论 -
数据结构练手题
数据结构——练手题目 第一节 —— 线性表 在完成线性表基本操作后的加强练习,现在复习下分享给大家 普通高校大二计科学生,非常热爱计算机这门艺术,欢迎大家交友交流 QQ:1600206666 后面会公布答案 在做了几个小项目过后意识到数据结构和算法的重要性回来复习下 1.已知两线性表list1,list2数据元素单调递增,要求实现合并两个线性表组成新表list3, 并保持有序性。(顺序表,链表) list1:1,7,10 list2:3,4,9,15 list3:1,3,4,7,9,10,15 2.已知原创 2021-02-04 03:37:04 · 279 阅读 · 0 评论