awesome-coding-javascript
awesome-coding-javascript copied to clipboard
📌 持续构建个人的源码库(JavaScript 原生、常用库、数据结构、算法)
awesome-coding-javascript
📌 持续构建个人的源码库,更多信息请看这篇文章。
1. JavaScript 原生和常用方法的代码实现
- [x] call / apply 实现
- [x] bind 实现
- [x] new 实现
- [x] deepclone 深拷贝实现
- [x] throttle 节流实现
- [x] debounce 防抖实现
- [x] URL 参数解析 实现
- [x] Promise 实现
- [x] async/await 实现
- [x] 订阅/发布 实现
- [x] 柯里化 实现
- [x] 模板字符串 实现
2. 常用的库和插件的代码实现
- [x] Webpack 的模拟实现
- [x] Webpack-Plugin 的实现
- [x] Babel 的模拟实现
- input => tokenizer => tokens
- tokens => parser => AST
- AST => transformer => newAST
- newAST => code generator => output
- [x] Babel-Plugin 的实现
- [x] Redux 的模拟实现
- [x] Router 的模拟实现
- hashRouter
- historyRouter
- [x] React 的模拟实现(在另外一个仓库,使用 TypeScript 实现)
- [x] Egg.js 的模拟实现(在另外一个仓库,暂无单元测试)
3. JavaScript 实现的数据结构和常用算法
3.1 数据结构
- Linked List 链表
- [x] linked list 双链表实现
- [x] merge linked list 合并两个链表
- [x] reverse linked list 反转链表
- Array 数组
- [x] remove duplicate 数组去重
- [x] two sum 两个数之和
- [x] three sum 三个数之和
- Heap 堆
- [x] heap 堆的实现
- [x] get min K nums 获取一段数组里面最小的 k 个数
- Stack 栈
- [x] stack 实现
- Queue 队列
- [x] queue 实现
- Set 集合
- Hash Table 散列表
- Tree 树
- [x] binary tree 二叉树
- [x] tree traversal 二叉树的先序/中序/后序非递归遍历
- [x] rebuild tree 重建二叉树
- [x] invert tree 翻转二叉树
- [x] tree symmetry 是否是镜像二叉树
3.2 算法
- Sort 排序
- [x] bubble sort 冒泡排序
- [x] selection sort 选择排序
- [x] insert sort 插入排序
- [x] merge sort 归并排序
- [x] quick sort 快速排序
- Divide and conquer 分治
- [x] binary search 二分查找
- [x] binary search tree 二叉搜索树
- Recursion 递归
- [x] jump floor 跳台阶
- [x] find all node path in tree 找出二叉树中结点值的和为输入整数的所有路径
- Traversal 遍历
- [x] DFS 深度优先遍历
- [x] BFS 广度优先遍历
- Double Pointer 双指针
- [x] find Kth to tail 求链表中倒数第 k 个结点
- [x] reOrder array 数组重排序,奇数在前半部分,偶数在后半部分
- Dynamic Programming 动态规划
- [x] min edit distance 最小编辑距离
- [x] min path sum 最少路径问题
- Backdate Programming 回溯算法
- [x] solve N queens N皇后问题
- Greedy Programming 贪心算法
- [x] distribution cookie 分发饼干
3.3 其他
- Number 数字
- [x] thousands format 千分位
- String 字符串
- [x] longest common substring 最长公共子串
- [x] KMP KMP 算法求子串的索引位置
Welcome to commit issue & pull request !