Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ConardLi/awesome-coding-js
用JavaScript实现的算法和数据结构,附详细解释和刷题指南
https://github.com/ConardLi/awesome-coding-js
List: awesome-coding-js
Last synced: 4 days ago
JSON representation
用JavaScript实现的算法和数据结构,附详细解释和刷题指南
- Host: GitHub
- URL: https://github.com/ConardLi/awesome-coding-js
- Owner: ConardLi
- Created: 2019-03-23T09:58:00.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-01-10T02:49:00.000Z (10 months ago)
- Last Synced: 2024-04-10T10:16:00.154Z (7 months ago)
- Homepage:
- Size: 5.36 MB
- Stars: 3,227
- Watchers: 99
- Forks: 511
- Open Issues: 18
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-fe-study-source - 前端算法面试相关
- ultimate-awesome - awesome-coding-js - 用JavaScript实现的算法和数据结构,附详细解释和刷题指南. (Other Lists / PowerShell Lists)
README
你好,我是 `世奇`,笔名 `ConardLi`,欢迎来到 `awesome-coding-js` 。
> 写代码 = 数据结构 + 算法 + ...
> 这里有大量算法和数据结构的JavaScript实现
> 基于不同的考察纬度,同一题目可能同时出现在不同分类中。
练好数据结构和算法,非一日之功💪。欢迎`Star`✨或`Watch`👀我们共同进步。
建议做题之前先阅读我这篇文章:[前端该如何准备数据结构和算法](https://juejin.im/post/5d5b307b5188253da24d3cd1),帮助你更高效的学习。
为了更好的阅读体验可以到:https://www.conardli.top 阅读。
- ⭐⭐:入门
- ⭐⭐⭐:进阶## JavaScript专题
- [手动实现call、apply、bind](https://www.conardli.top/docs/JavaScript/手动实现call、apply、bind)
- [EventEmitter](https://www.conardli.top/docs/JavaScript/EventEmitter)
- [防抖](https://www.conardli.top/docs/JavaScript/防抖)
- [节流](https://www.conardli.top/docs/JavaScript/节流)
- [浅拷贝和深拷贝](https://www.conardli.top/docs/JavaScript/浅拷贝和深拷贝)
- [数组去重、扁平、最值](https://www.conardli.top/docs/JavaScript/数组去重、扁平、最值)
- [数组乱序-洗牌算法](https://www.conardli.top/docs/JavaScript/数组乱序-洗牌算法)
- [函数柯里化](https://www.conardli.top/docs/JavaScript/函数柯里化)
- [手动实现JSONP](https://www.conardli.top/docs/JavaScript/手动实现JSONP)
- [模拟实现promise](https://www.conardli.top/docs/JavaScript/模拟实现promise)
- [手动实现ES5继承](https://www.conardli.top/docs/JavaScript/手动实现ES5继承)
- [手动实现instanceof](https://www.conardli.top/docs/JavaScript/手动实现instanceof)
- [基于Promise的ajax封装](https://www.conardli.top/docs/JavaScript/基于Promise的ajax封装)
- [单例模式](https://www.conardli.top/docs/JavaScript/单例模式)
- [异步循环打印](https://www.conardli.top/docs/JavaScript/异步循环打印)
- [图片懒加载](https://www.conardli.top/docs/JavaScript/图片懒加载)## 排序
- [复杂度](https://www.conardli.top/docs/algorithm/排序/复杂度)
- [排序-概览](https://www.conardli.top/docs/algorithm/排序/排序)
- [冒泡排序](https://www.conardli.top/docs/algorithm/排序/冒泡排序)⭐⭐
- [插入排序](https://www.conardli.top/docs/algorithm/排序/插入排序)⭐⭐
- [选择排序](https://www.conardli.top/docs/algorithm/排序/选择排序)⭐⭐
- [堆排序](https://www.conardli.top/docs/algorithm/排序/堆排序)⭐⭐⭐
- [快速排序](https://www.conardli.top/docs/algorithm/排序/快速排序)⭐⭐⭐
- [归并排序](https://www.conardli.top/docs/algorithm/排序/归并排序)⭐⭐⭐## 二叉树
- [二叉树-概览](https://www.conardli.top/docs/dataStructure/二叉树/二叉树)
- [二叉树的基本操作](https://www.conardli.top/docs/dataStructure/二叉树/二叉树的基本操作)⭐⭐
- [二叉树的中序遍历](https://www.conardli.top/docs/dataStructure/二叉树/二叉树的中序遍历)⭐⭐
- [二叉树的前序遍历](https://www.conardli.top/docs/dataStructure/二叉树/二叉树的前序遍历)⭐⭐
- [二叉树的后序遍历](https://www.conardli.top/docs/dataStructure/二叉树/二叉树的后序遍历)⭐⭐
- [重建二叉树](https://www.conardli.top/docs/dataStructure/二叉树/重建二叉树)⭐⭐
- [求二叉树的遍历](https://www.conardli.top/docs/dataStructure/二叉树/重建二叉树.md/#求二叉树的遍历)⭐⭐
- [对称的二叉树](https://www.conardli.top/docs/dataStructure/二叉树/对称的二叉树)⭐⭐
- [二叉树的镜像](https://www.conardli.top/docs/dataStructure/二叉树/二叉树的镜像)⭐⭐
- [二叉搜索树的第k个节点](https://www.conardli.top/docs/dataStructure/二叉树/二叉搜索树的第k个节点)⭐⭐
- [二叉搜索树的后序遍历](https://www.conardli.top/docs/dataStructure/二叉树/二叉搜索树的后序遍历)⭐⭐
- [二叉树的最大深度](https://www.conardli.top/docs/dataStructure/二叉树/二叉树的最大深度)⭐⭐
- [二叉树的最小深度](https://www.conardli.top/docs/dataStructure/二叉树/二叉树的最小深度)⭐⭐
- [平衡二叉树](https://www.conardli.top/docs/dataStructure/二叉树/平衡二叉树)⭐⭐
- [不分行从上到下打印二叉树](https://www.conardli.top/docs/dataStructure/二叉树/从上到下打印二叉树.md/#题目1-不分行从上到下打印)⭐⭐
- [把二叉树打印成多行](https://www.conardli.top/docs/dataStructure/二叉树/从上到下打印二叉树.md/#题目2-把二叉树打印成多行)⭐⭐
- [二叉树中和为某一值的路径](https://www.conardli.top/docs/dataStructure/二叉树/二叉树中和为某一值的路径)⭐⭐⭐
- [二叉搜索树与双向链表](https://www.conardli.top/docs/dataStructure/二叉树/二叉搜索树与双向链表)⭐⭐⭐
- [按之字形顺序打印二叉树](https://www.conardli.top/docs/dataStructure/二叉树/从上到下打印二叉树.md/#题目3-按之字形顺序打印二叉树)⭐⭐⭐
- [序列化二叉树](https://www.conardli.top/docs/dataStructure/二叉树/序列化二叉树)⭐⭐⭐
- [二叉树的下一个节点](https://www.conardli.top/docs/dataStructure/二叉树/二叉树的下一个节点)⭐⭐⭐
- [树的子结构](https://www.conardli.top/docs/dataStructure/二叉树/树的子结构)⭐⭐⭐## 链表
- [链表-概览](https://www.conardli.top/docs/dataStructure/链表/链表)
- [删除链表中的节点or重复的节点](https://www.conardli.top/docs/dataStructure/链表/删除链表中的节点or重复的节点)⭐⭐
- [从尾到头打印链表](https://www.conardli.top/docs/dataStructure/链表/从尾到头打印链表)⭐⭐
- [链表倒数第k个节点](https://www.conardli.top/docs/dataStructure/链表/链表倒数第k个节点)⭐⭐
- [反转链表](https://www.conardli.top/docs/dataStructure/链表/反转链表)⭐⭐
- [复杂链表的复制](https://www.conardli.top/docs/dataStructure/链表/复杂链表的复制)⭐⭐
- [两个链表的第一个公共节点](https://www.conardli.top/docs/dataStructure/链表/两个链表的第一个公共节点)⭐⭐
- [圈圈中最后剩下的数字](https://www.conardli.top/docs/dataStructure/链表/圈圈中最后剩下的数字)⭐⭐
- [链表中环的入口节点](https://www.conardli.top/docs/dataStructure/链表/链表中环的入口节点)⭐⭐⭐## 字符串
- [替换空格](https://www.conardli.top/docs/dataStructure/字符串/替换空格)⭐⭐
- [表示数值的字符串](https://www.conardli.top/docs/dataStructure/字符串/表示数值的字符串)⭐⭐
- [字符流中第一个不重复的字符](https://www.conardli.top/docs/dataStructure/字符串/字符流中第一个不重复的字符)⭐⭐
- [字符串的排列](https://www.conardli.top/docs/dataStructure/字符串/字符串的排列)⭐⭐
- [字符串翻转](https://www.conardli.top/docs/dataStructure/字符串/字符串翻转)⭐⭐
- [正则表达式匹配](https://www.conardli.top/docs/dataStructure/字符串/正则表达式匹配)⭐⭐⭐## 栈和队列
- [栈和队列-概览](https://www.conardli.top/docs/dataStructure/栈和队列/栈和队列)
- [用两个栈实现队列](https://www.conardli.top/docs/dataStructure/栈和队列/用两个栈实现队列)⭐⭐
- [包含min函数的栈](https://www.conardli.top/docs/dataStructure/栈和队列/包含min函数的栈)⭐⭐
- [栈的压入弹出序列](https://www.conardli.top/docs/dataStructure/栈和队列/栈的压入弹出序列)⭐⭐
- [滑动窗口的最大值](https://www.conardli.top/docs/dataStructure/栈和队列/滑动窗口的最大值)⭐⭐⭐## 数组
- [数组-概览](https://www.conardli.top/docs/dataStructure/数组/数组)
- [调整数组顺序使奇数位于偶数前面](https://www.conardli.top/docs/dataStructure/数组/调整数组顺序使奇数位于偶数前面) ⭐⭐
- [在排序数组中查找数字](https://www.conardli.top/docs/dataStructure/数组/在排序数组中查找数字)⭐⭐
- [数组中出现次数超过数组长度一半的数字](https://www.conardli.top/docs/dataStructure/数组/数组中出现次数超过数组长度一半的数字)⭐⭐
- [连续子数组的最大和](https://www.conardli.top/docs/dataStructure/数组/连续子数组的最大和) ⭐⭐
- [把数组排成最小的数](https://www.conardli.top/docs/dataStructure/数组/把数组排成最小的数) ⭐⭐
- [第一个只出现一次的字符](https://www.conardli.top/docs/dataStructure/数组/第一个只出现一次的字符) ⭐⭐
- [扑克牌顺子](https://www.conardli.top/docs/dataStructure/数组/扑克牌顺子) ⭐⭐
- [和为S的两个数字](https://www.conardli.top/docs/dataStructure/数组/和为S的两个数字) ⭐⭐
- [两数之和](https://www.conardli.top/docs/dataStructure/数组/两数之和) ⭐⭐
- [三数之和](https://www.conardli.top/docs/dataStructure/数组/三数之和) ⭐⭐⭐
- [四数之和](https://www.conardli.top/docs/dataStructure/数组/四数之和) ⭐⭐⭐
- [和为S的连续正整数序列](https://www.conardli.top/docs/dataStructure/数组/和为S的连续正整数序列) ⭐⭐⭐
- [构建乘积数组](https://www.conardli.top/docs/dataStructure/数组/构建乘积数组) ⭐⭐⭐
- [顺时针打印矩阵](https://www.conardli.top/docs/dataStructure/数组/顺时针打印矩阵) ⭐⭐⭐
- [数组中的逆序对](https://www.conardli.top/docs/dataStructure/数组/数组中的逆序对)⭐⭐⭐## 堆
- [堆-概览](https://www.conardli.top/docs/dataStructure/堆/堆)
- [堆的基本操作](https://www.conardli.top/docs/dataStructure/堆/堆的基本操作)⭐⭐⭐
- [数据流中的中位数](https://www.conardli.top/docs/dataStructure/堆/数据流中的中位数)⭐⭐⭐
- [最小的k个数](https://www.conardli.top/docs/dataStructure/堆/最小的k个数)⭐⭐⭐## 哈希表
- [哈希表-概览](https://www.conardli.top/docs/dataStructure/哈希表/哈希表)
## 分治
- [数组中的逆序对](https://www.conardli.top/docs/algorithm/分治/数组中的逆序对)⭐⭐⭐
## 数学运算
- [二进制中1的个数](https://www.conardli.top/docs/algorithm/数学运算/二进制中1的个数)⭐⭐
- [数值的整数次方](https://www.conardli.top/docs/algorithm/数学运算/数值的整数次方)⭐⭐
- [数组中只出现一次的数字](https://www.conardli.top/docs/algorithm/数学运算/数组中只出现一次的数字)⭐⭐
- [不用加减乘除做加法](https://www.conardli.top/docs/algorithm/数学运算/不用加减乘除做加法)⭐⭐
- [字符串转换成整数](https://www.conardli.top/docs/algorithm/数学运算/字符串转换成整数)⭐⭐
- [整数中1出现的次数](https://www.conardli.top/docs/algorithm/数学运算/整数中1出现的次数)⭐⭐⭐
- [1+2+3+...+n](https://www.conardli.top/docs/algorithm/数学运算/1+2+3+...+n)⭐⭐⭐
- [丑数](https://www.conardli.top/docs/algorithm/数学运算/丑数)⭐⭐⭐## 查找
- [查找-概览](https://www.conardli.top/docs/algorithm/查找/查找)
- [二维数组查找](https://www.conardli.top/docs/algorithm/查找/二维数组查找)⭐⭐
- [在排序数组中查找数字](https://www.conardli.top/docs/algorithm/查找/在排序数组中查找数字)⭐⭐
- [整数中1出现的次数](https://www.conardli.top/docs/algorithm/查找/整数中1出现的次数)⭐⭐## DFS和BFS
- [DFS和BFS-概览](https://www.conardli.top/docs/algorithm/DFS和BFS/DFS和BFS)
## 递归和循环
- [递归-概览](https://www.conardli.top/docs/algorithm/递归和循环/递归)
- [斐波拉契数列](https://www.conardli.top/docs/algorithm/递归和循环/斐波拉契数列)⭐⭐
- [跳台阶](https://www.conardli.top/docs/algorithm/递归和循环/跳台阶)⭐⭐
- [变态跳台阶](https://www.conardli.top/docs/algorithm/递归和循环/变态跳台阶)⭐⭐
- [矩形覆盖](https://www.conardli.top/docs/algorithm/递归和循环/矩形覆盖)⭐⭐## 回溯算法
- [回溯-概览](https://www.conardli.top/docs/algorithm/回溯算法/回溯算法)
- [二叉树中和为某一值的路径](https://www.conardli.top/docs/algorithm/回溯算法/二叉树中和为某一值的路径)⭐⭐⭐
- [字符串的排列](https://www.conardli.top/docs/algorithm/回溯算法/字符串的排列)⭐⭐⭐
- [和为sum的n个数](https://www.conardli.top/docs/algorithm/回溯算法/和为sum的n个数)⭐⭐⭐
- [矩阵中的路径](https://www.conardli.top/docs/algorithm/回溯算法/矩阵中的路径)⭐⭐⭐
- [机器人的运动范围](https://www.conardli.top/docs/algorithm/回溯算法/机器人的运动范围)⭐⭐⭐
- [N皇后问题](https://www.conardli.top/docs/algorithm/回溯算法/N皇后问题)⭐⭐⭐
- [N皇后问题2](https://www.conardli.top/docs/algorithm/回溯算法/N皇后问题2)⭐⭐⭐## 动态规划
- [动态规划-概览](https://www.conardli.top/docs/algorithm/动态规划/动态规划)
- [斐波拉契数列](https://www.conardli.top/docs/algorithm/递归和循环/斐波拉契数列)⭐⭐
- [最小路径和](https://www.conardli.top/docs/algorithm/动态规划/最小路径和)⭐⭐⭐
- [打家劫舍](https://www.conardli.top/docs/algorithm/动态规划/打家劫舍)⭐⭐⭐## 贪心算法
- [贪心算法-概览](https://www.conardli.top/docs/algorithm/贪心算法/贪心算法)
- [分发饼干](https://www.conardli.top/docs/algorithm/贪心算法/分发饼干)⭐⭐## 其他专栏
- 掘金:[ConardLi](https://juejin.cn/user/3949101466785709)
- 知乎:[ConardLi](https://www.zhihu.com/people/wen-ti-chao-ji-duo-de-xiao-qi)
- 个人博客:[code秘密花园](https://github.com/ConardLi/ConardLi.github.io/tree/master)## 联系方式
- 微信:[ConardLi](https://mp.weixin.qq.com/s?__biz=Mzk0MDMwMzQyOA==&mid=2247493407&idx=1&sn=41b8782a3bdc75b211206b06e1929a58&chksm=c2e11234f5969b22a0d7fd50ec32be9df13e2caeef186b30b5d653836b0725def8ccd58a56cf#rd)
- 公众号:[code秘密花园](https://mp.weixin.qq.com/s?__biz=Mzk0MDMwMzQyOA==&mid=2247493407&idx=1&sn=41b8782a3bdc75b211206b06e1929a58&chksm=c2e11234f5969b22a0d7fd50ec32be9df13e2caeef186b30b5d653836b0725def8ccd58a56cf#rd)
- Github:https://github.com/ConardLi## 版权声明
CC-BY-NC-4.0 LICENSE
你可以在非商业的前提下免费转载,但同时你必须:明确署名作者:`ConardLi` 以及文章的原始链接。