Skip to content

Arrays(数组)、Stacks(栈)、Queues(队列)、LinkedList(链表)、Recursion(递归思想)、BinarySearchTree(二分搜索树)、Set(集合)、Map(映射)、Heap(堆)、PriorityQueue(优先队列)、SegmentTree(线段树)、Trie(字典树)、UnionFind(并查集)、AVLTree(AVL平衡树树)、RedBlackTree(红黑平衡树)、HashTable(哈希表)

License

aiyoudiao/MaoDataStructures

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

喵数据结构

说明

JS 数据结构解析和算法实现,全部文章大概的内容如下: Arrays(数组)、Stacks(栈)、Queues(队列)、LinkedList(链表)、Recursion(递归思想)、BinarySearchTree(二分搜索树)、Set(集合)、Map(映射)、Heap(堆)、PriorityQueue(优先队列)、SegmentTree(线段树)、Trie(字典树)、UnionFind(并查集)、AVLTree(AVL 平衡树)、RedBlackTree(红黑平衡树)、HashTable(哈希表)

后面补充: 十种排序算法:冒泡排序、选择排序、插入排序、希尔排序、归并排序、快速排序、堆排序、计数排序、桶排序、基数排序。 图
其它算法:最小生成树的贪心算法、最短路径的动态规划、树形结构的递归、归并排序和快速排序的分治算法。 其它数据结构:斐波那契堆、索引堆。

源代码有三个:ES6(单个单个的 class 类型的 js 文件) | JS + HTML(一个 js 配合一个 html)| JAVA (一个一个的工程) | C++ (一个一个的工程,排序算法部分含js代码)

在浏览器的vscode中简单看代码,可以点击这个github1s

掘金平台-三年前写的简陋文章
思否平台-三年前写的简陋文章,工作中几乎不写java程序,所以就没更新了。其实文章内容都一样,只是贴的代码不同。

掘金平台-现在整理的文章,还在更新当中,后面会陆续整理输出。

还是三年前那句老话:光看文章能够掌握两成,动手敲代码、动脑思考、画图才可以掌握八成。

这个适合 对数据结构想了解并且感兴趣的人群,整理这些笔记加源码,时间跨度也算将近半年时间了,希望对想学习数据结构的人或者正在学习数据结构的人群有帮助。

老的思维导图,思维导图是用国产的MindMaster来弄的,MindMap目录中有源文件的噢。
思维导图

原目录结构

├─001-Arrays
│  ├─001-Array-Basics
│  ├─002-Create-Our-Own-Array
│  ├─003-Add-Element-in-Array
│  ├─004-Query-and-Update-Element
│  ├─005-Contain-Find-and-Remove
│  ├─006-Generic-Data-Structures
│  ├─007-Dynamic-Array
│  └─008-Amortized-Time-Complexity
├─002-Stacks-and-Queues
│  ├─001-Create-Our-Own-Stack
│  ├─002-Stack-Valid-Parentheses-In-Leetcode
│  ├─003-Create-Our-Own-Queue
│  └─004-Queues-Comparison
├─003-Linked-List
│  ├─001-Linked-List-Basics
│  ├─002-Add-Elements-In-LinkedList
│  ├─003-DummyHead-In-LinkedList
│  ├─004-Query-And-Update-In-LinkedList
│  ├─005-Remove-Element-In-LinkedList
│  ├─006-Implement-Stack-In-LinkedList
│  ├─007-Stacks-Comparison
│  └─008-Implement-Queue-In-LinkedList
├─004-Recursion
│  ├─001-Remove-LinkedList-Elements
│  ├─002-Test-Your-LinkedList-Solution
│  ├─003-Recursion-Basics
│  ├─004-Recursion-Remove-LinkedList-Elements
│  └─005-Debug-Recursive-Solution
├─005-Binary-Search-Tree
│  ├─001-Binary-Search-Tree-Basics
│  ├─002-Add-Elements-In-BST
│  ├─003-Improved-Add-Elements-In-BST
│  ├─004-Search-Elements-In-BST
│  ├─005-PreOrder-Traverse-In-BST
│  ├─006-Debug-PreOrder-Traverse-In-BST
│  ├─007-InOrder-And-PostOrder-Traverse-In-BST
│  ├─008-Non-Recursion-PreOrder-Traverse-In-BST
│  ├─009-Level-Traverse-In-BST
│  ├─010-Remove-Min-And-Max-In-BST
│  └─011-Remove-Elements-In-BST
├─006-Set-And-Map
│  ├─001-Set-Basics-And-BSTSet
│  ├─002-Create-Our-Own-LinkedListSet
│  ├─003-Time-Complexity-Of-Set
│  ├─004-TreeSet-And-Set-Problems-In-Leetcode
│  ├─005-Map-Basics
│  ├─006-Create-Our-Own-LinekdListMap
│  ├─007-Create-Our-Own-BSTMap
│  ├─008-Time-Complexity-Of-Map
│  └─009-LeetCode-Problems-About-Map-And-Set
├─007-Heap-And-Priority-Queue
│  ├─001-Heap-Basics
│  ├─002-Add-Elements-And-Sift-Up-In-Heap
│  ├─003-Extract-Max-Element-And-Sift-Down-In-Heap
│  ├─004-Heapify-And-Replace-In-Heap
│  ├─005-Priority-Queue
│  └─006-Priority-Queue-Problems-In-Leetcode
├─008-Segment-Tree
│  ├─001-Segment-Tree-Basics
│  ├─002-Building-Segment-Tree
│  ├─003-Query-In-Segment-Tree
│  ├─004-Segment-Tree-Problems-In-Leetcode
│  └─005-Update-Single-Element-In-Segment-Tree
├─009-Trie
│  ├─001-Trie-Basics
│  ├─002-Searching-In-Trie
│  ├─003-Prefix-In-Trie
│  ├─004-Trie-And-Pattern-Match
│  ├─005-Trie-And-Map
│  └─006-Trie-About
├─010-UnionFind
│  ├─001-UnionFind-Interface
│  ├─002-Quick-Find
│  ├─003-Quick-Union
│  ├─004-Optimized-By-Size
│  ├─005-Optimized-By-Rank
│  ├─006-Path-Compression
│  └─007-More-About-Union-Find
├─011-AVL-Tree
│  ├─001-Calculating-Balance-Factor
│  ├─002-Checking-Balancing-And-Binary-Search-Property
│  ├─003-Rotation-Operations
│  ├─004-The-Implementation-Of-Left-Rotation-And-Right-Rotation
│  ├─005-LR-And-RL-In-AVLTree
│  ├─006-Remove-Elements-In-AVL-Tree
│  └─007-Map-And-Set-In-AVL-Tree
├─012-Red-Black-Tree
│  ├─001-The-Equivalence-Of-RBTree-And-2-3-Tree
│  ├─002-Keep-Root-Black-And-Left-Rotation
│  ├─003-Flip-Colors-And-Right-Rotation
│  ├─004-Adding-Elements-In-Rad-Black-Tree
│  ├─005-Time-Complexity-Of-Red-Black-Tree
│  └─006-The-Performance-Of-Red-Black-Tree
└─013-Hash-Table
    ├─001-Hash-Table-Basics
    ├─002-Hash-Function
    ├─003-Hash-Table-Implementation
    ├─004-Resizing-In-Hash-Table
    └─005-More-About-Resizing-In-Hash-Table

新增目录结构

├─001-Sorting-Basic    
│  ├─.idea
│  ├─001-Selection-Sort
│  │  └─js
│  ├─002-Selection-Sort-Using-Template
│  │  └─js
│  ├─003-Selection-Sort-Generate-Test-Cases
│  │  └─js
│  ├─004-Selection-Sort-Detect-Performance
│  │  └─js
│  ├─005-Insertion-Sort
│  │  └─js
│  ├─006-Insertion-Sort-Advance
│  │  └─js
│  └─js
├─002-Sorting-Advance
│  ├─.idea
│  ├─001-Merge-Sort
│  │  └─js
│  ├─002-Merge-Sort-Advance
│  │  └─js
│  ├─003-Merge-Sort-Bottom-Up
│  │  └─js
│  ├─004-Quick-Sort
│  │  └─js
│  ├─005-Quick-Sort-Deal-With-Nearly-Ordered-Array
│  │  └─js
│  ├─006-Quick-Sort-Deal-With-Identcal-Keys
│  │  └─js
│  ├─007-Quick-Sort-Three-Ways
│  │  └─js
├─003-Heap
│  ├─.idea
│  ├─001-Max-Heap-Class-Basic
│  ├─002-Max-Heap-Shift-Up
│  ├─003-Max-Heap-Shift-Down
│  ├─004-Heap-Sort-Basic-And-Heapify
│  ├─005-Heap-Sort-Advance
│  ├─006-Heap-Sort-In-Situ
│  ├─007-Index-Heap-Basic
│  ├─008-Index-Heap-Advance
├─004-BinarySearchTree
│  ├─.idea
│  ├─001-Binary-Serach
│  ├─002-Binary-Search-Tree-Basics
│  ├─003-Binary-Search-Tree-Insert
│  ├─004-Binary-Search-Tree-Search
│  ├─005-Binary-Search-Tree-Traverse
│  ├─006-Binary-Search-Tree-Level-Traverse
│  ├─007-Binary-Search-Tree-Remove-Min-And-Max
│  ├─008-Binary-Search-Tree-Remove
├─005-Union-Find
│  ├─.idea
│  ├─001-Quick-Find
│  ├─002-Quick-Union
│  ├─003-Optimize-By-Size
│  ├─004-Optimaize-By-Rank
│  ├─005-Path-Compression
└─006-Graph-Theory
    ├─.idea
    ├─001-Graph-Representation
    ├─002-Vertex-Adjacent-Iterator
    ├─003-Read-Graph
    ├─004-DFS-and-Components
    ├─005-Finding-A-Path
    ├─006-BFS-And-Shortest-Path

使用说明

  1. 前端看代码:ES6 文件夹,编辑器添加这个文件夹
  2. 前端看代码效果:JS 文件夹,打开里面子文件夹中的 index.html
  3. 后端看代码加运行效果:JAVA 文件夹,编辑器打开子文件夹中的工程。
  4. 后面补的代码看效果:C++文件夹,编辑器打开文件夹中的工程。前端看代码效果也是一样,里面每一个子目录下都有一个JS文件夹,打开里面子文件夹中的 index.html。后面会慢慢整理出来的。

最后说明

三年前大概花了大半年时间学数据结构和算法,大都是从慕课网bobo老师那里学的,还有按照bobo老师的建议从网上找资料学。感谢bobo老师出的课程,让我不只浮于表面。
记得当时刚开始接触,老师每一句话我都会听几遍,然后记录老师的建议以及我自己的心得体会。
老师的每一章节代码我都会敲一遍,然后再用js去同样的实现一遍。老师的每一份源码我应该都写了3遍这样,不过可能我当时不太聪明,时常脑袋懵懵的,不过三年后我再看这些东西,我就觉得并没有那么难,都是一些设计思路,有认知才能慢慢实现,一开始不完美不要紧,只要你认知还在,以后慢慢的就越来越清楚。

算法和数据结构给我带来了很大的影响,尽管后面工作中几乎没用到,我也忘了很多,后来发现这些基础的东西也是最重要的。所以我又决定把它们整理一下。

About

Arrays(数组)、Stacks(栈)、Queues(队列)、LinkedList(链表)、Recursion(递归思想)、BinarySearchTree(二分搜索树)、Set(集合)、Map(映射)、Heap(堆)、PriorityQueue(优先队列)、SegmentTree(线段树)、Trie(字典树)、UnionFind(并查集)、AVLTree(AVL平衡树树)、RedBlackTree(红黑平衡树)、HashTable(哈希表)

Resources

License

Stars

Watchers

Forks

Packages

No packages published