# 面试准备
- 2022.12
- 最长递增子序列:leetcode300 (opens new window)
- 最长公共子序列(LCS):leetcode1143 (opens new window)
- 编辑距离:leetcode72 (opens new window)
- 最大子序列和:leetcode53 (opens new window)
- 打家劫舍:leetcode198 (opens new window)
- 最小路径和:leetcode64 (opens new window)
- 前序遍历:leetcode144 (opens new window)
- 中序遍历:leetcode94 (opens new window)
- 后序遍历:leetcode145 (opens new window)
- 2023.1
- 实现 map、reduce、'abcd'.f() 返回 'd-c-b-a'
- this 指向
- new 实现
- 什么是原型
- 说出常见的数组方法
- 防抖、节流(时间戳版和定时器版并说出区别)
- osi七层协议,TCP/IP五层协议,arp/rarp协议
- BFC 概念
- 跨平台与跨端技术
- 2023.2
- 闭包:概念、优缺点、应用(Vue diff 算法、nodeOps)
- 函数式编程:纯函数、递归与尾递归、记忆函数、高阶函数、柯里化与偏函数、函数组合
- 垃圾回收机制(GC算法、内存泄露、内存溢出、V8引擎的内存分配与垃圾回收)
- 手写:并发请求控制、数组去重(4种)、数组扁平化(2种)、判断数组方法(5种)、instanceof
- Promise(手写、方法)、深拷贝、WeakMap、WeakSet
- fetch、ajax、axios、XHR 区别(ajax异步技术包括新的fetch和传统的XHR, axios是对XHR的封装)
- 合并有序数组:leetcode88 (opens new window)
- 合并区间:leetcode56 (opens new window)
- 前端缓存(浏览器缓存、HTTP缓存)cache-control、last-modified(3个缺点)、etag
- 事件循环(宏任务、微任务)、nextTick原理
- 二分查找:二分查找 (opens new window)
- LRU:leetcode146 (opens new window)
- 只出现过一次的数字:leetcode136 (opens new window)
- 旋转矩阵:旋转矩阵 (opens new window)
- diff 算法(createPatchFunction、patch、patchVnode、updateChildren、vue 和 react 在虚拟dom的diff上,做了哪些改进使得速度很快、O(n^3) 和 O(n) 如何计算)
- 浏览器多进程架构、页面渲染解析过程、回流与重绘、CSS硬件加速、js/css 阻塞 dom 解析/渲染?、script 标签 defer、async
- 路径总和:leetcode112 (opens new window)、求根到叶子节点数字之和:leetcode129 (opens new window)
- 岛屿数量:leetcode200 (opens new window)、岛屿最大面积:leetcode695 (opens new window)
- 7层模型、UDP/TCP(超时重传、滑动窗口、流量控制、拥塞控制)、http(0.9 ~ 3、长连接/管道化、多路复用/二进制分帧/首部压缩)、队头阻塞(TCP和HTTP)、https
- 最近公共祖先:leetcode236 (opens new window)、翻转二叉树:leetcode226 (opens new window)、相同的树:leetcode100 (opens new window)
- XSS(反射、存储、Dom):httponly、转义、csp、x-xss-protected;CSRF:同源检测、samesite、验证码、token;点击劫持:禁止内嵌;中间人攻击;控制台注入;钓鱼;第三方依赖安全;
- 发布订阅模式、观察者模式、Object.create(null) 和 {} 区别
- 二叉树的层次遍历:leetcode102 (opens new window)、二叉树的最大宽度:leetcode662 (opens new window)、二叉树的右视图:leetcode199 (opens new window)
- Vue 响应式原理、proxy(Reflect、receiver)
- 二叉树的最大深度:leetcode104 (opens new window)、二叉树的最小深度:leetcode111 (opens new window)、N叉树的最大深度:leetcode559 (opens new window)
- vuex(state、mutation、action)、redux(state、reducer、action)、react-redux 区别
- 最长有效括号:leetcode32 (opens new window)
- 前端路由:hash(hashchange)、history(pushState、replaceState、popState)
- 回溯算法、全排列:Leetcode46 (opens new window)、括号生成:leetcode22 (opens new window)、电话号码的数字组合:leetcode17 (opens new window)、子集:Leetcode78 (opens new window)
- 继承(ES5、ES6)、Object.create、call/apply/bind 实现
- 路径总和:leetcode112 (opens new window)、路径总和II:leetcode112 (opens new window)
- 组合总和:leetcode39 (opens new window)、组合总和II:leetcode40 (opens new window)
- http 状态码、cookie 和 session 区别、小程序原理
- 2023.3
- 面试题整理
- 前序中序构造二叉树:leetcode105 (opens new window)
- 扁平数据结构转Tree、根据边构造二叉树
- 两个栈实现队列 (opens new window)
- background-size: 100%、cover、contain 的区别
- 100%: 按容器比例撑满,图片变形;
- cover: 图片宽高比不变,把背景图片放大到适合元素容器的尺寸,但是超出容器的部分可能会裁掉。
- contain: 图片宽高比不变,缩放至整个图片自身能完全显示出来,所以容器会有留白区域。
- 最大宽度坡: leetcode962 (opens new window)、表现良好的最长时间段: leetcode1124 (opens new window)
- 最小栈: leetcode155 (opens new window)
- 单调栈相关题目:
- 每日温度: leetcode739 (opens new window)
- 下一个更大元素: leetcode496 (opens new window)
- 接雨水: leetcode42 (opens new window)
- 柱状图中的最大矩形: leetcode84 (opens new window)
- 最大矩形: leetcode85 (opens new window)
- 移掉 k 位数字: leetcode402 (opens new window)
- 动态规划:
- 最大子序列和(连续): leetcode53 (opens new window)
- 最长递增子序列: leetcode300 (opens new window)
- 最长公共子序列(LCS): leetcode1143 (opens new window)
- 最长非重复子串: 剑指offer48 (opens new window)
- 编辑距离(SES): leetcode72 (opens new window)
- 买卖股票的最佳时机: leetcode121 (opens new window)
- 最小路径和: leetcode64 (opens new window)
- 三角形的最小路径和: leetcode120 (opens new window)
- 顺时针打印矩阵: leetcode54 (opens new window)
- 岛屿数量: leetcode200 (opens new window)
- 岛屿最大面积: leetcode695 (opens new window)
- 求根到叶子节点数字之和: leetcode129 (opens new window)
- 路径总和: leetcode112 (opens new window)
- 环形链表: leetcode141 (opens new window)
- 环形链表2: leetcode142 (opens new window)
- 树相关:
- 相同的树: leetcode100 (opens new window)
- 判断二叉树是否对称: leetcode101 (opens new window)
- 合并二叉树: leetcode617 (opens new window)
- 求二叉树的深度(最大): leetcode104 (opens new window)
- 求二叉树的深度(最小): leetcode111 (opens new window)
- 翻转二叉树: leetcode226 (opens new window)
- 验证二叉搜索树: leetcode98 (opens new window)
- 数组第k大元素: leetcode215 (opens new window)
- 堆排序、快排、冒泡、选择排序
- 合并两个有序链表: leetcode21 (opens new window)
- 滑动窗口最大值: leetcode239 (opens new window)