I will put my solutions all data structure and algo in python. Please feel free to contact me if you have any questions with this repo:)
Sort
Dynamic programming
Graph
Array 数组
Stack 栈
Queue 队列
Linked List 链表
Binary Search Tree 二分搜索树
Heap 堆
Index Heap 索引堆
Segment Tree 线段树
Trie
Union Find 并查集
AVL
Red Black Tree 红黑树
Hash Table 哈希表
Graph 图论基础
| ** 数据结构与算法 ** | python |
|---|---|
| ** 第一章 排序基础 ** | python |
| 1-1 选择排序 - Selection Sort | python |
| 1-2 插入排序 - Insertion Sort | python |
| 1-3 冒泡排序 - Bubble Sort | python |
| 1-4 归并排序 - Merge Sort | python |
| 1-5 归并排序优化 - Merge Sort Optimastion | python |
| 1-6 快速排序 - Quick Sort | python |
| 1-7 快速排序优化 - Quick Sort Optimastion | python |
| 1-8 希尔排序 - Shell Sort | python |
| 1-9 桶排序 - Bucket Sort | python |
| 1-10 三路快速排序 - Bucket Sort | python |
| ** 第二章 递归基础 ** | python |
| 2-1 递归斐波那契 - Fib list | python |
| 2-2 二分查找 - Binary Search | python |
| 2-3 八皇后问题 - Eight Queen | python |
| 2-4 汉诺塔 - hanoi Tower | python |
| 2-5 全排列 - All ranges | python |
| ** 第三章 动规基础 ** | python |
| 3-1 0-1背包问题回溯解法 - Bag | python |
| 3-2 0-1背包问题记忆化搜索 - Bag | python |
| 3-3 0-1背包问题动规 - Bag | python |
| 3-4 数字金字塔回溯解法 - pyramid_search | python |
| 3-5 数字金字塔记忆化搜索 - pyramid_memo | python |
| 3-6 数字金字塔动规 - pyramid_dp | python |
| ** 第四章 Array ** | python |
| 4-1 动态数组实现 - Array | python |
| ** 第五章 栈和队列 ** | python |
| 5-1 动态数组实现栈 - StackArray | python |
| 5-2 leetcode22 - Stack | python |
| 5-3 动态数组实现队列 - Queue | python |
| 5-4 动态数组实现循环队列 - LoopQueue | python |
| 5-5 循环队列vs队列 - Queue | python |
| ** 第6章 链表 ** | python |
| 6-1 链表实现 - LinkedList | python |
| 6-2 链表实现栈 - LinkedListStack | python |
| 6-3 链表实现栈vs数组栈 - LinkedListStack vs StackArray | python |
| 6-4 链表实现队列 - LinkedListQueue | python |
| 6-5 队列比较 - LinkedListQueue vs LoopQueue vs ArrayQueue | python |
| ** 第8章 二分搜索树 BST ** | python |
| 8-1 二分搜索法 - BinarySearch | python |
| 8-2 二分搜索树 - BST | python |
| ** 第9章 SET和MAP ** | python |
| 9-1 基于二分搜索树的SET - BSTSet | python |
| 9-2 基于链表的SET - LinkedListSet | python |
| 9-3 基于二分搜索树的Map - BSTMap | python |
| 9-4 基于链表的Map - LinkedListMap | python |
| ** 第十章 优先队列和堆 ** | python |
| 10-1 基于数组的最大堆 - MaxHeap | python |
| 10-2 优先队列 - PriorityQueue | python |
| 10-3 堆排序 - HeapSort | python |
| 10-4 索引堆 - indexHeap | python |
| ** 第十一章 线段树- Segment Tree ** | python |
| 11-1 线段树 - SegmentTree | python |
| ** 第十二章 字典树- Trie ** | python |
| 12-1 字典书实现 - Trie | python |
| 12-2 BSTSet vs Trie | python |
| ** 第十三章 并查集 - Union Find ** | python |
| 13-1 并查集 - Union Find(Quick Find) | python |
| 13-2 并查集 - Union Find(Quick Union) | python |
| 13-3 并查集 - (基于size的优化) | python |
| 13-4 并查集 - (基于rank的优化) | python |
| 13-5 并查集 - (路径压缩) | python |
| 13-6 并查集 - (路径压缩递归实现) | python |
| ** 第十四章 AVL tree ** | python |
| 14-1 avl | python |
| ** 第十五章 红黑树 RedBlack tree ** | python |
| 15-1 RedBlackTree实现 | python |
| 15-2 RedBlackTree vsAVL vs BST 比较 | python |
| ** 第十六章 哈希表 Hashtable ** | python |
| 16-1 Hashtable 实现 | python |
| ** 第十七章 图 Graph ** | python |
| 17-1 Graph的实现 --邻接矩阵 | python |
| 17-2 Graph的实现 --邻接表 | python |
| 17-3 Graph的联通变量 --深度优先遍历 | python |
| 17-4 Graph的路径 --深度优先遍历 | python |
| 17-5 无权图Graph的路径最短路径 --广度优先遍历 | python |
| ** 第十八章 带权图 Weighted Graph ** | python |
| 18-1 Graph的实现 --邻接矩阵 | python |
| 18-2 Graph的实现 --邻接表 | python |
| 18-3 最小生成树lazyprim的实现 --lazyPrim | python |
| 18-4 最小生成树prim的实现 --Prim | python |
| 18-5 最小生成树Kruskal的实现(UnionFind) --Kruskal | python |
| ** 第十九章 带权图最短路径 Shortest Path in Weighted Graph ** | python |
| 19-1 Dijkstra算法 --基于索引堆实现 | python |
| 19-2 Bellman-Ford算法 --基于索引堆实现 | python |
| ** 第二十章 SQRT分解 ** | python |
| 20-1 sqrt分解 --实现 | python |