前端算法学习路径——【算法】浅谈前端算法
前端处理数据也可以很简单
更优更简洁的生成树和操作树算法
- 数据结构和算法在UI组件中的应用—-树形菜单的实现
- 递归与非递归在JS对象中的应用—-多层次对象属性查找
- 力学理论在前端流程图中的应用—-流程图连线优化
- 遗传算法在前端可视化中的应用—-地图Tip响应式适配优化
李银城-我接触过的前端数据结构与算法
Effective前端24-学习常用的前端算法与数据结构
为什么我认为数据结构与算法对前端开发很重要?
图形算法(邻接矩阵)在前端领域的应用
javascript将扁平的数据转为树形结构
==》 antd 优秀源码库里的index.js
/*** Convert an array to a tree-structured array.* @param {array} array The Array need to Converted.* @param {string} id The alias of the unique ID of the object in the array.* @param {string} parentId The alias of the parent ID of the object in the array.* @param {string} children The alias of children of the object in the array.* @return {array} Return a tree-structured array.*/export function arrayToTree(array,id = 'id',parentId = 'pid',children = 'children') {const result = []const hash = {}const data = cloneDeep(array)data.forEach((item, index) => {hash[data[index][id]] = data[index]})data.forEach(item => {const hashParent = hash[item[parentId]]if (hashParent) {!hashParent[children] && (hashParent[children] = [])hashParent[children].push(item)} else {result.push(item)}})return result}
深度剖析:如何实现一个 Virtual DOM 算法
JavaScript基于时间的动画算法
前端图表聚合函数(借鉴sql的语法实现前端的数据处理)
前言
列举涉及的知识点:
- 递归
- 使用递归实现不堵塞多串行请求
- 递归查DOM
- 递归查DOM非递归实现
- 查找下个结点
- 复杂选择器的查DOM (给定id和class 找出相应dom)
- 重复值处理
- set、map的实现
- 引申—数组去重
- 堆和栈
- 节流
- 图像处理与图形算法
一句惊醒梦中人的话:
![]() |
|---|
参考资料
笔记来源:
- 《高效前端—web高效编程与优化实践》

