TypeScript + Jest 实现基本数据结构和算法

讨论 未结 0 38
chrispaullhk
chrispaullhk 会员 2022年5月27日 06:29 发表
<h3>基于 TypeScript + Jest 实现基本数据结构和算法, 持续完善和更新中,希望大佬们捧场给个 Star</h3> <h3>掘金地址 <a href="https://juejin.cn/post/7102269215498829832" rel="nofollow">掘金链接 https://juejin.cn/post/7102269215498829832</a></h3> <h3>项目地址 <a href="https://github.com/chris-paul/algorithm-delicacies" rel="nofollow">Algorithm-Delicacies( https://github.com/chris-paul/algorithm-delicacies)</a></h3> <h2>dataStructure</h2> <h4>时间复杂度和空间复杂度计算</h4> <ul> <li><a href="https://github.com/chris-paul/algorithm-delicacies/issues/1" rel="nofollow">时间复杂度和空间复杂度</a></li> </ul> <h4>栈</h4> <ul> <li> <p><a href="https://github.com/chris-paul/algorithm-delicacies/issues/2" rel="nofollow">栈和队列(V8 数组底层实现)</a></p> </li> <li> <p><a href="https://github.com/chris-paul/algorithm-delicacies/blob/master/src/dataStructure/stack/index.tsx" rel="nofollow">栈实现</a></p> </li> </ul> <h4>队列</h4> <ul> <li> <p><a href="https://github.com/chris-paul/algorithm-delicacies/issues/3" rel="nofollow">队列数据结构类型以及实现差异</a></p> </li> <li> <p><a href="https://github.com/chris-paul/algorithm-delicacies/tree/master/src/dataStructure/queue/index.tsx" rel="nofollow">普通队列实现</a></p> </li> <li> <p><a href="https://github.com/chris-paul/algorithm-delicacies/tree/master/src/dataStructure/queue/deque/index.tsx" rel="nofollow">双端队列实现</a></p> </li> <li> <p><a href="https://github.com/chris-paul/algorithm-delicacies/tree/master/src/dataStructure/queue/circularQueue/index.tsx" rel="nofollow">环形队列实现</a></p> </li> <li> <p>最优队列实现</p> </li> </ul> <h4>链表</h4> <ul> <li> <p><a href="https://github.com/chris-paul/algorithm-delicacies/tree/master/src/dataStructure/linkedList/singleLinkedList/index.tsx" rel="nofollow">单向链表实现</a> </p> </li> <li> <p>双向链表实现 </p> </li> </ul> <h4>集合</h4> <ul> <li> <p><a href="https://github.com/chris-paul/algorithm-delicacies/issues/7" rel="nofollow">集合简介以及 JavaScript 中的集合</a></p> </li> <li> <p><a href="https://github.com/chris-paul/algorithm-delicacies/tree/master/src/dataStructure/set/index.tsx" rel="nofollow">集合实现</a></p> </li> </ul> <h4>字典</h4> <ul> <li> <p><a href="https://github.com/chris-paul/algorithm-delicacies/issues/4" rel="nofollow">Dictionary 以及 HashTable</a></p> </li> <li> <p><a href="https://github.com/chris-paul/algorithm-delicacies/tree/master/src/dataStructure/dictionary/hashTable/index.tsx" rel="nofollow">hashTable 实现</a></p> </li> <li> <p><a href="https://github.com/chris-paul/algorithm-delicacies/tree/master/src/dataStructure/dictionary/separateLinkedListHashTable/index.tsx" rel="nofollow">分离链接法解决 hash 冲突</a></p> </li> <li> <p><a href="https://github.com/chris-paul/algorithm-delicacies/tree/master/src/dataStructure/dictionary/LinearExplorationHashTable/index.tsx" rel="nofollow">线性探查法解决 hash 冲突</a></p> </li> </ul> <h4>树</h4> <ul> <li> <p><a href="https://github.com/chris-paul/algorithm-delicacies/issues/5" rel="nofollow">树的类型以及特点</a></p> </li> <li> <p><a href="https://github.com/chris-paul/algorithm-delicacies/tree/master/src/dataStructure/tree/binaryTree/index.tsx" rel="nofollow">二叉树的实现</a></p> </li> <li> <p><a href="https://github.com/chris-paul/algorithm-delicacies/tree/master/src/dataStructure/tree/binaryTree/depthFirstSearch" rel="nofollow">二叉树的深度优先遍历</a></p> </li> <li> <p><a href="https://github.com/chris-paul/algorithm-delicacies/tree/master/src/dataStructure/tree/binaryTree/breadthFirstSearch" rel="nofollow">二叉树的广度优先遍历</a></p> </li> <li> <p><a href="https://github.com/chris-paul/algorithm-delicacies/tree/master/src/dataStructure/tree/binaryTree/binarySearchTree" rel="nofollow">搜索二叉树的实现</a></p> </li> <li> <p><a href="https://github.com/chris-paul/algorithm-delicacies/tree/master/src/dataStructure/tree/binaryTree/avlTree" rel="nofollow">AVL 树的实现</a></p> </li> </ul> <h3>图</h3> <ul> <li> <p><a href="https://github.com/chris-paul/algorithm-delicacies/issues/6" rel="nofollow">邻接矩阵和邻接表表示图</a></p> </li> <li> <p><a href="https://github.com/chris-paul/algorithm-delicacies/tree/master/src/dataStructure/graph/index.tsx" rel="nofollow">图的实现</a></p> </li> <li> <p><a href="https://github.com/chris-paul/algorithm-delicacies/blob/master/src/dataStructure/graph/breadthFirstSearchFirstSearch.tsx" rel="nofollow">图的深度优先遍历</a></p> </li> <li> <p><a href="https://github.com/chris-paul/algorithm-delicacies/blob/master/src/dataStructure/graph/depthFirstSearch.tsx" rel="nofollow">图的广度优先遍历</a></p> </li> </ul> <h3>堆</h3> <ul> <li> <p><a href="https://github.com/chris-paul/algorithm-delicacies/issues/8" rel="nofollow">堆简介</a></p> </li> <li> <p><a href="https://github.com/chris-paul/algorithm-delicacies/tree/master/src/dataStructure/heap/index.tsx" rel="nofollow">最小堆的实现</a></p> </li> </ul> <h2>algorithm</h2> <h3>栈</h3> <p><a href="https://github.com/chris-paul/algorithm-delicacies/tree/master/src/algorithm/stack/020%E6%9C%89%E6%95%88%E7%9A%84%E6%8B%AC%E5%8F%B7" rel="nofollow">leetcode 20 有效的括号</a></p> <h3>队列</h3> <p>[leetcode 933 最小请求次数]( <a href="https://github.com/chris-paul/algorithm-delicacies/tree/master/src/algorithm/queue/933" rel="nofollow">https://github.com/chris-paul/algorithm-delicacies/tree/master/src/algorithm/queue/933</a> 最近请求次数 /index.tsx)</p> <p>[击鼓传花]( <a href="https://github.com/chris-paul/algorithm-delicacies/tree/master/src/algorithm/queue/%E5%87%BB%E9%BC%93%E4%BC%A0%E8%8A%B1" rel="nofollow">https://github.com/chris-paul/algorithm-delicacies/tree/master/src/algorithm/queue/击鼓传花</a> /index.tsx)</p> <h4>链表</h4> <p>[leetcode 002 两数之和]( <a href="https://github.com/chris-paul/algorithm-delicacies/tree/master/src/algorithm/linkedList/002" rel="nofollow">https://github.com/chris-paul/algorithm-delicacies/tree/master/src/algorithm/linkedList/002</a> 两数之和 /index.tsx)</p> <p>[leetcode 083 删除排序链表中的重复元素]( <a href="https://github.com/chris-paul/algorithm-delicacies/tree/master/src/algorithm/linkedList/083" rel="nofollow">https://github.com/chris-paul/algorithm-delicacies/tree/master/src/algorithm/linkedList/083</a> 删除排序链表中的重复元素 /index.tsx)</p> <p>[leetcode 141 环形链表]( <a href="https://github.com/chris-paul/algorithm-delicacies/tree/master/src/algorithm/linkedList/141" rel="nofollow">https://github.com/chris-paul/algorithm-delicacies/tree/master/src/algorithm/linkedList/141</a> 环形链表 /index.tsx)</p> <p>[leetcode 206 链表反转]( <a href="https://github.com/chris-paul/algorithm-delicacies/tree/master/src/algorithm/linkedList/206" rel="nofollow">https://github.com/chris-paul/algorithm-delicacies/tree/master/src/algorithm/linkedList/206</a> 链表反转 /index.tsx)</p> <p>[leetcode 234 回文链表]( <a href="https://github.com/chris-paul/algorithm-delicacies/tree/master/src/algorithm/linkedList/234" rel="nofollow">https://github.com/chris-paul/algorithm-delicacies/tree/master/src/algorithm/linkedList/234</a> 回文链表 /index.tsx)</p> <h4>集合</h4> <p>[leetcode 349 求交集]( <a href="https://github.com/chris-paul/algorithm-delicacies/tree/master/src/algorithm/set/349" rel="nofollow">https://github.com/chris-paul/algorithm-delicacies/tree/master/src/algorithm/set/349</a> 求交集 /index.tsx)</p> <h4>字典</h4> <p>[leetcode 003 无重复字符的最长子串]( <a href="https://github.com/chris-paul/algorithm-delicacies/tree/master/src/algorithm/map/003" rel="nofollow">https://github.com/chris-paul/algorithm-delicacies/tree/master/src/algorithm/map/003</a> 无重复字符的最长子串 /index.tsx)</p> <p>[leetcode 001 两数之和]( <a href="https://github.com/chris-paul/algorithm-delicacies/tree/master/src/algorithm/map/001" rel="nofollow">https://github.com/chris-paul/algorithm-delicacies/tree/master/src/algorithm/map/001</a> 两数之和 /index.tsx)</p> <h4>树</h4> <p>[leetcode 102 二叉树的层次遍历]( <a href="https://github.com/chris-paul/algorithm-delicacies/tree/master/src/algorithm/tree/102" rel="nofollow">https://github.com/chris-paul/algorithm-delicacies/tree/master/src/algorithm/tree/102</a> 二叉树的层次遍历 /index.tsx)</p> <p>[leetcode 104 二叉树的最大深度]( <a href="https://github.com/chris-paul/algorithm-delicacies/tree/master/src/algorithm/tree/104" rel="nofollow">https://github.com/chris-paul/algorithm-delicacies/tree/master/src/algorithm/tree/104</a> 二叉树的最大深度 /index.tsx)</p> <p>[leetcode 111 二叉树的最小深度]( <a href="https://github.com/chris-paul/algorithm-delicacies/tree/master/src/algorithm/tree/111" rel="nofollow">https://github.com/chris-paul/algorithm-delicacies/tree/master/src/algorithm/tree/111</a> 二叉树的最小深度 /index.tsx)</p> <p>[leetcode 144 二叉树先序遍历]( <a href="https://github.com/chris-paul/algorithm-delicacies/tree/master/src/algorithm/tree/144" rel="nofollow">https://github.com/chris-paul/algorithm-delicacies/tree/master/src/algorithm/tree/144</a> 二叉树先序遍历 /index.tsx)</p> <p>[leetcode 226 翻转二叉树]( <a href="https://github.com/chris-paul/algorithm-delicacies/tree/master/src/algorithm/tree/226" rel="nofollow">https://github.com/chris-paul/algorithm-delicacies/tree/master/src/algorithm/tree/226</a> 翻转二叉树 /index.tsx)</p> <h4>搜索</h4> <p><a href="https://github.com/chris-paul/algorithm-delicacies/tree/master/src/algorithm/search/binarySearch/index.tsx" rel="nofollow">二分查找</a></p> <h4>排序</h4> <p><a href="https://github.com/chris-paul/algorithm-delicacies/tree/master/src/algorithm/sort/bubbleSort/index.tsx" rel="nofollow">冒泡排序</a></p> <p><a href="https://github.com/chris-paul/algorithm-delicacies/tree/master/src/algorithm/sort/selectionSort/index.tsx" rel="nofollow">选择排序</a></p> <p><a href="https://github.com/chris-paul/algorithm-delicacies/tree/master/src/algorithm/sort/insertionSort/index.tsx" rel="nofollow">插入排序</a></p> <p><a href="https://github.com/chris-paul/algorithm-delicacies/tree/master/src/algorithm/sort/mergeSort/index.tsx" rel="nofollow">归并排序</a></p> <p><a href="https://github.com/chris-paul/algorithm-delicacies/tree/master/src/algorithm/sort/quickSort/index.tsx" rel="nofollow">快速排序</a></p>
收藏(0)  分享
相关标签: 灌水交流
注意:本文归作者所有,未经作者允许,不得转载
0个回复
  • 消灭零回复