数据结构与算法
内内么斜
初学者
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
数据结构与算法-总结
day1: 数据结构算法: 线性:数组 链表 双向链表 堆栈 队列 双向队列等 非线性:二叉树 图 等 算法: 查找 排序 数据结构:数据元素一级数据元素存储之间的关系结构 day2: 数组: (1).一片连续的内存空间 不能是断开的 (2).因为是连续的内存空间 才可以使用下标来访问 所以访问效率高 (3).在数据前面插入和删除的效率都比较低(需要移动数据) 链表: 当前元素保...原创 2019-08-19 19:35:56 · 497 阅读 · 0 评论 -
数据结构与算法-第九章计数,基数
时间复杂度 最坏时间复杂度 空间复杂度 稳定性 计数排序 n+k n+k n+k 稳定 基数排序 n*m n*m m 稳定 计数排序(桶排序) void countSort(int arr[],size_t len){ int max = arr[0]; int min = a...原创 2019-10-22 10:26:08 · 233 阅读 · 0 评论 -
数据结构与算法-第八章-堆,希尔,快速,归并
时间复杂度 最坏时间复杂度 空间复杂度 稳定性 归并排序 nlogn nlogn n 稳定 快速排序 nlogn n^2 logn 不稳定 堆排序 nlogn nlogn 1 不稳定 希尔排序 nlogn n*s 1...原创 2019-10-22 10:19:22 · 156 阅读 · 0 评论 -
数据结构与算法-第七章冒泡,选择,鸡尾酒,插入
时间复杂度 最坏时间复杂度 空间复杂度 稳定性 冒泡 n^2 n^2 1 稳定 选择 n^2 n^2 1 不稳定 鸡尾酒 n^2 n^2 1 不稳定 直接插入 n^2 n^2 1 稳定 折半插入 n^2 n...原创 2019-10-22 10:08:48 · 340 阅读 · 0 评论 -
数据结构与算法-第六章树
Btree.h #ifndef _BTREE_H__ #define _BTREE_H__ #include <stdio.h> #include <stdlib.h> #include <stdbool.h> typedef int T; typedef struct TNode{ T data; struct TNode *left; struct...原创 2019-10-22 09:37:36 · 452 阅读 · 0 评论 -
数据结构与算法-第五章双向队列
Dequeuer.h #ifndef _DEQUE_H__ #define _DEQUE_H__ #include <stdio.h> #include <stdlib.h> #include <stdbool.h> typedef int T; typedef struct Deque{ T *m_vect; //存储元素的内存空间 size_...原创 2019-10-22 09:35:28 · 160 阅读 · 0 评论 -
数据结构与算法-第四章队列
Queue.h #ifndef _QUEUE_H__ #define _QUEUE_H__ #include <stdio.h> #include <stdlib.h> #include <stdbool.h> typedef int T; typedef struct Queue{ T *m_vect; //存储数据的内存空间 size_t cap...原创 2019-10-22 09:33:31 · 180 阅读 · 0 评论 -
数据结构与算法-第三章双向链表
Dlink.h #ifndef _DLINK_H__ #define _DLINK_H__ #include <stdio.h> #include <stdbool.h> #include <stdlib.h> typedef int T; typedef struct DNode{ T data; struct DNode *prev; struct...原创 2019-10-22 09:31:18 · 178 阅读 · 0 评论 -
数据结构与算法-第二章链表
Slink.h #ifndef _SLINK_H__ #define _SLINK_H__ #include <stdio.h> #include <stdlib.h> #include <stdbool.h> typedef int T; //单向链表的节点 typedef struct SNode{ T data; //节点元素 ...原创 2019-10-22 09:29:45 · 301 阅读 · 0 评论 -
数据结构与算法-第一章堆栈
Stack.h #ifndef _STACK_H__ #define _STACK_H__ #include <stdio.h> #include <stdlib.h> #include <stdbool.h> typedef int T; //#define N 10 typedef struct Stack{ T* m_vect; //存储元素内存空...原创 2019-10-22 09:26:48 · 211 阅读 · 0 评论
分享