From 17a4ea3ea7d526126eda6e8cd8864ca42a903484 Mon Sep 17 00:00:00 2001 From: sl1673495 <949589855@qq.com> Date: Thu, 2 Jul 2020 21:21:12 +0800 Subject: [PATCH 01/11] =?UTF-8?q?feat:=20=E6=9C=89=E5=BA=8F=E7=9F=A9?= =?UTF-8?q?=E9=98=B5=E4=B8=AD=E7=AC=ACK=E5=B0=8F=E7=9A=84=E5=85=83?= =?UTF-8?q?=E7=B4=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...47\232\204\345\205\203\347\264\240-378.js" | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 "\346\234\211\345\272\217\347\237\251\351\230\265\344\270\255\347\254\254K\345\260\217\347\232\204\345\205\203\347\264\240-378.js" diff --git "a/\346\234\211\345\272\217\347\237\251\351\230\265\344\270\255\347\254\254K\345\260\217\347\232\204\345\205\203\347\264\240-378.js" "b/\346\234\211\345\272\217\347\237\251\351\230\265\344\270\255\347\254\254K\345\260\217\347\232\204\345\205\203\347\264\240-378.js" new file mode 100644 index 0000000..6ce08fc --- /dev/null +++ "b/\346\234\211\345\272\217\347\237\251\351\230\265\344\270\255\347\254\254K\345\260\217\347\232\204\345\205\203\347\264\240-378.js" @@ -0,0 +1,31 @@ +/** + * @param {number[][]} matrix + * @param {number} k + * @return {number} + */ +let kthSmallest = function (matrix, k) { + let maxY = matrix.length + let sorted = [] + let points = [] + for (let i = 0; i < maxY; i++) { + points[i] = 0 + } + + while (sorted.length < k) { + let min = Infinity + let minY + for (let y = 0; y < maxY; y++) { + let point = points[y] + let num = matrix[y][point] + if (num < min) { + min = num + minY = y + } + } + sorted.push(min) + // 选中最小项的x指针右移 + points[minY]++ + } + + return sorted[sorted.length - 1] +}; \ No newline at end of file From 6064152a745b263cc0b68a799e29dd8ff42be72b Mon Sep 17 00:00:00 2001 From: sl1673495 <949589855@qq.com> Date: Sat, 4 Jul 2020 12:40:30 +0800 Subject: [PATCH 02/11] =?UTF-8?q?feat:=20=E5=AD=97=E6=AF=8D=E8=BF=AD?= =?UTF-8?q?=E4=BB=A3=E7=BB=84=E5=90=88=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...7\273\204\345\220\210\345\231\250-1286.js" | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 "\351\200\222\345\275\222\344\270\216\345\233\236\346\272\257/\345\255\227\346\257\215\350\277\255\344\273\243\347\273\204\345\220\210\345\231\250-1286.js" diff --git "a/\351\200\222\345\275\222\344\270\216\345\233\236\346\272\257/\345\255\227\346\257\215\350\277\255\344\273\243\347\273\204\345\220\210\345\231\250-1286.js" "b/\351\200\222\345\275\222\344\270\216\345\233\236\346\272\257/\345\255\227\346\257\215\350\277\255\344\273\243\347\273\204\345\220\210\345\231\250-1286.js" new file mode 100644 index 0000000..709bae1 --- /dev/null +++ "b/\351\200\222\345\275\222\344\270\216\345\233\236\346\272\257/\345\255\227\346\257\215\350\277\255\344\273\243\347\273\204\345\220\210\345\231\250-1286.js" @@ -0,0 +1,52 @@ +/** + * @param {string} characters + * @param {number} combinationLength + */ +let CombinationIterator = function (characters, combinationLength) { + let cl = characters.length + let res = [] + let helper = (start, prev) => { + let pl = prev.length + for (let i = start; i < cl; i++) { + let rest = cl - i + let diff = combinationLength - pl + if (diff > rest) { + return + } + let next = prev + characters[i] + if (next.length == combinationLength) { + res.push(next) + } else { + helper(i + 1, next) + } + } + } + helper(0, "") + this.res = res.sort((a, b) => (a > b ? 1 : -1)) + this.point = 0 +} + +/** + * @return {string} + */ +CombinationIterator.prototype.next = function () { + if (!this.hasNext()) { + return undefined + } + let val = this.res[this.point++] + return val +} + +/** + * @return {boolean} + */ +CombinationIterator.prototype.hasNext = function () { + return this.point !== this.res.length +} + +/** + * Your CombinationIterator object will be instantiated and called as such: + * var obj = new CombinationIterator(characters, combinationLength) + * var param_1 = obj.next() + * var param_2 = obj.hasNext() + */ From 3998c84f22cea30b10a49751dbeff6245b43d48c Mon Sep 17 00:00:00 2001 From: sl1673495 <949589855@qq.com> Date: Sat, 4 Jul 2020 14:22:18 +0800 Subject: [PATCH 03/11] =?UTF-8?q?feat:=20=E9=A1=BA=E6=AC=A1=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...1\241\272\346\254\241\346\225\260-1291.js" | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 "\351\200\222\345\275\222\344\270\216\345\233\236\346\272\257/\351\241\272\346\254\241\346\225\260-1291.js" diff --git "a/\351\200\222\345\275\222\344\270\216\345\233\236\346\272\257/\351\241\272\346\254\241\346\225\260-1291.js" "b/\351\200\222\345\275\222\344\270\216\345\233\236\346\272\257/\351\241\272\346\254\241\346\225\260-1291.js" new file mode 100644 index 0000000..13f8a5c --- /dev/null +++ "b/\351\200\222\345\275\222\344\270\216\345\233\236\346\272\257/\351\241\272\346\254\241\346\225\260-1291.js" @@ -0,0 +1,30 @@ +/** + * @param {number} low + * @param {number} high + * @return {number[]} + */ +let sequentialDigits = function (low, high) { + let lowLen = low.toString().length + let highLen = high.toString().length + let lens = [] + for (let i = lowLen; i <= highLen; i++) { + lens.push(i) + } + + let res = [] + for (let i = 0; i < lens.length; i++) { + let len = lens[i] + for (let start = 1; start <= 10 - len; start++) { + let num = start + + for (let n = start + 1; n < start + len; n++) { + num = 10 * num + n + } + if (num <= high && num >= low) { + res.push(num) + } + } + } + + return res +} \ No newline at end of file From 852f31f67ffe3fa21784d3b93df8e9b73c1cac49 Mon Sep 17 00:00:00 2001 From: sl1673495 <949589855@qq.com> Date: Sun, 5 Jul 2020 02:13:23 +0800 Subject: [PATCH 04/11] docs: format --- README.md | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index a61690a..dfd2737 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,7 @@ 思路会记录在本仓库的 Issues 中,按照 label 进行分类。比如想查看 「DFS」 分类下的问题,那么选择标签进行筛选即可。 ## 目录 + ### 链表 [移除链表元素-203](https://github.com/sl1673495/leetcode-javascript/issues/97) @@ -24,11 +25,11 @@ [两两交换链表中的节点-24](https://github.com/sl1673495/leetcode-javascript/issues/51) -[删除链表的倒数第N个节点-19](https://github.com/sl1673495/leetcode-javascript/issues/46) +[删除链表的倒数第 N 个节点-19](https://github.com/sl1673495/leetcode-javascript/issues/46) -[删除链表的节点-面试题18](https://github.com/sl1673495/leetcode-javascript/issues/40) +[删除链表的节点-面试题 18](https://github.com/sl1673495/leetcode-javascript/issues/40) -[反转链表II-92](https://github.com/sl1673495/leetcode-javascript/issues/39) +[反转链表 II-92](https://github.com/sl1673495/leetcode-javascript/issues/39) [反转链表 206](https://github.com/sl1673495/leetcode-javascript/issues/38) @@ -90,9 +91,9 @@ [最大子序和-53](https://github.com/sl1673495/leetcode-javascript/issues/17) -[分割等和子集(01背包的变种)-416](https://github.com/sl1673495/leetcode-javascript/issues/16) +[分割等和子集(01 背包的变种)-416](https://github.com/sl1673495/leetcode-javascript/issues/16) -[背包(01背包)](https://github.com/sl1673495/leetcode-javascript/issues/15) +[背包(01 背包)](https://github.com/sl1673495/leetcode-javascript/issues/15) [使用最小花费爬楼梯-746](https://github.com/sl1673495/leetcode-javascript/issues/13) @@ -112,7 +113,7 @@ [解数独-37](https://github.com/sl1673495/leetcode-javascript/issues/79) -[N皇后-51](https://github.com/sl1673495/leetcode-javascript/issues/78) +[N 皇后-51](https://github.com/sl1673495/leetcode-javascript/issues/78) [单词搜索-79](https://github.com/sl1673495/leetcode-javascript/issues/77) @@ -136,7 +137,7 @@ [分割回文串-131](https://github.com/sl1673495/leetcode-javascript/issues/67) -[复原IP地址-93](https://github.com/sl1673495/leetcode-javascript/issues/66) +[复原 IP 地址-93](https://github.com/sl1673495/leetcode-javascript/issues/66) [电话号码的字母组合-17](https://github.com/sl1673495/leetcode-javascript/issues/65) @@ -152,7 +153,7 @@ [分发饼干-455](https://github.com/sl1673495/leetcode-javascript/issues/88) -[N皇后-51](https://github.com/sl1673495/leetcode-javascript/issues/78) +[N 皇后-51](https://github.com/sl1673495/leetcode-javascript/issues/78) [单词搜索-79](https://github.com/sl1673495/leetcode-javascript/issues/77) @@ -170,7 +171,7 @@ [二分查找-704](https://github.com/sl1673495/leetcode-javascript/issues/23) -[背包(01背包)](https://github.com/sl1673495/leetcode-javascript/issues/15) +[背包(01 背包)](https://github.com/sl1673495/leetcode-javascript/issues/15) [盛水最多的容器-11](https://github.com/sl1673495/leetcode-javascript/issues/3) From c674be0d0e465fa31a87cf01bb1c3b5e1ef7a80c Mon Sep 17 00:00:00 2001 From: sl1673495 <949589855@qq.com> Date: Tue, 7 Jul 2020 16:45:37 +0800 Subject: [PATCH 05/11] =?UTF-8?q?feat:=20=E6=8B=AC=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...\235\242\350\257\225\351\242\230 08.09.js" | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 "\351\200\222\345\275\222\344\270\216\345\233\236\346\272\257/\346\213\254\345\217\267-\351\235\242\350\257\225\351\242\230 08.09.js" diff --git "a/\351\200\222\345\275\222\344\270\216\345\233\236\346\272\257/\346\213\254\345\217\267-\351\235\242\350\257\225\351\242\230 08.09.js" "b/\351\200\222\345\275\222\344\270\216\345\233\236\346\272\257/\346\213\254\345\217\267-\351\235\242\350\257\225\351\242\230 08.09.js" new file mode 100644 index 0000000..604f5c4 --- /dev/null +++ "b/\351\200\222\345\275\222\344\270\216\345\233\236\346\272\257/\346\213\254\345\217\267-\351\235\242\350\257\225\351\242\230 08.09.js" @@ -0,0 +1,23 @@ +/** + * @param {number} n + * @return {string[]} + */ +let generateParenthesis = function (n) { + let res = [] + + let helper = (left, right, prev) => { + if (left < 0 || right < 0 || right < left) { + return + } + if (left === 0 && right === 0) { + res.push(prev) + return + } + + helper(left - 1, right, prev + "(") + helper(left, right - 1, prev + ")") + } + + helper(n, n, '') + return res +}; \ No newline at end of file From a5adb8ef868b4ca83b66c0ac03814e84426d6b07 Mon Sep 17 00:00:00 2001 From: sl1673495 <949589855@qq.com> Date: Wed, 8 Jul 2020 23:51:45 +0800 Subject: [PATCH 06/11] =?UTF-8?q?feat:=20=E8=B7=B3=E6=B0=B4=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...\235\242\350\257\225\351\242\230 16.11.js" | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 "\351\200\222\345\275\222\344\270\216\345\233\236\346\272\257/\350\267\263\346\260\264\346\235\277-\351\235\242\350\257\225\351\242\230 16.11.js" diff --git "a/\351\200\222\345\275\222\344\270\216\345\233\236\346\272\257/\350\267\263\346\260\264\346\235\277-\351\235\242\350\257\225\351\242\230 16.11.js" "b/\351\200\222\345\275\222\344\270\216\345\233\236\346\272\257/\350\267\263\346\260\264\346\235\277-\351\235\242\350\257\225\351\242\230 16.11.js" new file mode 100644 index 0000000..fb26019 --- /dev/null +++ "b/\351\200\222\345\275\222\344\270\216\345\233\236\346\272\257/\350\267\263\346\260\264\346\235\277-\351\235\242\350\257\225\351\242\230 16.11.js" @@ -0,0 +1,23 @@ +/** + * @param {number} shorter + * @param {number} longer + * @param {number} k + * @return {number[]} + */ +let divingBoard = function (shorter, longer, k) { + if (k === 0) { + return [] + } + if (shorter === longer) { + return [k * shorter] + } + + let res = [] + for (let i = 0; i <= k; i++) { + let longCount = i + let shortCount = k - i + res.push(shortCount * shorter + longCount * longer) + } + + return res +}; \ No newline at end of file From d1ad49174b0e7e8be76f7d8269740bc602a1bd06 Mon Sep 17 00:00:00 2001 From: ssh <949589855@qq.com> Date: Sat, 11 Jul 2020 14:00:39 +0800 Subject: [PATCH 07/11] Update README.md --- README.md | 217 +++++++++++++++++++++++++++++------------------------- 1 file changed, 118 insertions(+), 99 deletions(-) diff --git a/README.md b/README.md index dfd2737..78e30a6 100644 --- a/README.md +++ b/README.md @@ -17,44 +17,101 @@ ## 目录 -### 链表 -[移除链表元素-203](https://github.com/sl1673495/leetcode-javascript/issues/97) +### 例题详解 -[两数相加-3](https://github.com/sl1673495/leetcode-javascript/issues/94) +[最接近的三数之和-16](https://github.com/sl1673495/leetcode-javascript/issues/115) + +[分发饼干-455](https://github.com/sl1673495/leetcode-javascript/issues/88) + +[N皇后-51](https://github.com/sl1673495/leetcode-javascript/issues/78) + +[单词搜索-79](https://github.com/sl1673495/leetcode-javascript/issues/77) + +[二进制手表-401](https://github.com/sl1673495/leetcode-javascript/issues/76) + +[电话号码的字母组合-17](https://github.com/sl1673495/leetcode-javascript/issues/65) + +[二叉树的所有路径-257](https://github.com/sl1673495/leetcode-javascript/issues/59) + +[路径总和-112](https://github.com/sl1673495/leetcode-javascript/issues/57) [两两交换链表中的节点-24](https://github.com/sl1673495/leetcode-javascript/issues/51) -[删除链表的倒数第 N 个节点-19](https://github.com/sl1673495/leetcode-javascript/issues/46) +[有效的括号-20](https://github.com/sl1673495/leetcode-javascript/issues/48) + +[无重复字符的最长子串-3](https://github.com/sl1673495/leetcode-javascript/issues/42) -[删除链表的节点-面试题 18](https://github.com/sl1673495/leetcode-javascript/issues/40) +[二分查找-704](https://github.com/sl1673495/leetcode-javascript/issues/23) -[反转链表 II-92](https://github.com/sl1673495/leetcode-javascript/issues/39) +### 递归与回溯 -[反转链表 206](https://github.com/sl1673495/leetcode-javascript/issues/38) +[跳水板-面试题 16.11 ](https://github.com/sl1673495/leetcode-javascript/issues/118) -### 双指针 +[顺次数-1291](https://github.com/sl1673495/leetcode-javascript/issues/116) -[搜索二维矩阵 II-240](https://github.com/sl1673495/leetcode-javascript/issues/96) +[螺旋矩阵 II-59](https://github.com/sl1673495/leetcode-javascript/issues/113) -[判断子序列-392](https://github.com/sl1673495/leetcode-javascript/issues/89) +[螺旋矩阵-54](https://github.com/sl1673495/leetcode-javascript/issues/112) -[分发饼干-455](https://github.com/sl1673495/leetcode-javascript/issues/88) +[矩阵置零-73](https://github.com/sl1673495/leetcode-javascript/issues/111) -[验证回文串-125](https://github.com/sl1673495/leetcode-javascript/issues/33) +[不同路径 III-980](https://github.com/sl1673495/leetcode-javascript/issues/107) -[两数之和 II - 输入有序数组-167](https://github.com/sl1673495/leetcode-javascript/issues/32) +[字母大小写全排列-784](https://github.com/sl1673495/leetcode-javascript/issues/106) -[合并两个有序数组-88](https://github.com/sl1673495/leetcode-javascript/issues/29) +[黄金矿工-1219](https://github.com/sl1673495/leetcode-javascript/issues/105) -[移动零-283](https://github.com/sl1673495/leetcode-javascript/issues/26) +[有重复字符串的排列组合-面试题 08.08](https://github.com/sl1673495/leetcode-javascript/issues/104) + +[单词搜索 II-212](https://github.com/sl1673495/leetcode-javascript/issues/92) + +[解数独-37](https://github.com/sl1673495/leetcode-javascript/issues/79) + +[N皇后-51](https://github.com/sl1673495/leetcode-javascript/issues/78) + +[单词搜索-79](https://github.com/sl1673495/leetcode-javascript/issues/77) -[删除排序数组中的重复项-26](https://github.com/sl1673495/leetcode-javascript/issues/8) +[二进制手表-401](https://github.com/sl1673495/leetcode-javascript/issues/76) + +[子集 II-90](https://github.com/sl1673495/leetcode-javascript/issues/75) + +[ 组合总和 III-216](https://github.com/sl1673495/leetcode-javascript/issues/74) + +[组合总和 II-40](https://github.com/sl1673495/leetcode-javascript/issues/73) + +[组合总和-39](https://github.com/sl1673495/leetcode-javascript/issues/72) + +[子集-78](https://github.com/sl1673495/leetcode-javascript/issues/71) + +[组合-77](https://github.com/sl1673495/leetcode-javascript/issues/70) + +[全排列 II-47](https://github.com/sl1673495/leetcode-javascript/issues/69) + +[全排列-46](https://github.com/sl1673495/leetcode-javascript/issues/68) + +[分割回文串-131](https://github.com/sl1673495/leetcode-javascript/issues/67) -[盛水最多的容器-11](https://github.com/sl1673495/leetcode-javascript/issues/3) +[复原IP地址-93](https://github.com/sl1673495/leetcode-javascript/issues/66) + +[电话号码的字母组合-17](https://github.com/sl1673495/leetcode-javascript/issues/65) + +[括号生成-22](https://github.com/sl1673495/leetcode-javascript/issues/31) ### 动态规划 +[最长的斐波那契子序列的长度-873](https://github.com/sl1673495/leetcode-javascript/issues/117) + +[最长重复子数组-718](https://github.com/sl1673495/leetcode-javascript/issues/114) + +[下降路径最小和-931](https://github.com/sl1673495/leetcode-javascript/issues/108) + +[最大正方形-221](https://github.com/sl1673495/leetcode-javascript/issues/101) + +[恢复空格-面试题 17.13](https://github.com/sl1673495/leetcode-javascript/issues/100) + +[最长单词-面试题 17.15](https://github.com/sl1673495/leetcode-javascript/issues/99) + [单词拆分 II-140](https://github.com/sl1673495/leetcode-javascript/issues/95) [单词拆分-139](https://github.com/sl1673495/leetcode-javascript/issues/93) @@ -87,95 +144,89 @@ [买卖股票的最佳时机-121](https://github.com/sl1673495/leetcode-javascript/issues/19) -[乘积最大子数组-152](https://github.com/sl1673495/leetcode-javascript/issues/18) - -[最大子序和-53](https://github.com/sl1673495/leetcode-javascript/issues/17) - -[分割等和子集(01 背包的变种)-416](https://github.com/sl1673495/leetcode-javascript/issues/16) - -[背包(01 背包)](https://github.com/sl1673495/leetcode-javascript/issues/15) +### 双指针 -[使用最小花费爬楼梯-746](https://github.com/sl1673495/leetcode-javascript/issues/13) +[最接近的三数之和-16](https://github.com/sl1673495/leetcode-javascript/issues/115) -[零钱兑换 II-518](https://github.com/sl1673495/leetcode-javascript/issues/12) +[通过删除字母匹配到字典里最长单词-524](https://github.com/sl1673495/leetcode-javascript/issues/98) -[打家劫舍 - 198](https://github.com/sl1673495/leetcode-javascript/issues/10) +[搜索二维矩阵 II-240](https://github.com/sl1673495/leetcode-javascript/issues/96) -[完全平方数-279](https://github.com/sl1673495/leetcode-javascript/issues/9) +[判断子序列-392](https://github.com/sl1673495/leetcode-javascript/issues/89) -[整数拆分-343](https://github.com/sl1673495/leetcode-javascript/issues/7) +[分发饼干-455](https://github.com/sl1673495/leetcode-javascript/issues/88) -[斐波那契数-509](https://github.com/sl1673495/leetcode-javascript/issues/2) +[验证回文串-125](https://github.com/sl1673495/leetcode-javascript/issues/33) -### 递归与回溯 +[两数之和 II - 输入有序数组-167](https://github.com/sl1673495/leetcode-javascript/issues/32) -[单词搜索 II-212](https://github.com/sl1673495/leetcode-javascript/issues/92) +[合并两个有序数组-88](https://github.com/sl1673495/leetcode-javascript/issues/29) -[解数独-37](https://github.com/sl1673495/leetcode-javascript/issues/79) +[移动零-283](https://github.com/sl1673495/leetcode-javascript/issues/26) -[N 皇后-51](https://github.com/sl1673495/leetcode-javascript/issues/78) +### 前缀和 -[单词搜索-79](https://github.com/sl1673495/leetcode-javascript/issues/77) +[和为K的子数组-560](https://github.com/sl1673495/leetcode-javascript/issues/110) -[二进制手表-401](https://github.com/sl1673495/leetcode-javascript/issues/76) +### 位运算 -[子集 II-90](https://github.com/sl1673495/leetcode-javascript/issues/75) +[找不同-389](https://github.com/sl1673495/leetcode-javascript/issues/109) -[ 组合总和 III-216](https://github.com/sl1673495/leetcode-javascript/issues/74) +### 查找表 -[组合总和 II-40](https://github.com/sl1673495/leetcode-javascript/issues/73) +[找不同-389](https://github.com/sl1673495/leetcode-javascript/issues/109) -[组合总和-39](https://github.com/sl1673495/leetcode-javascript/issues/72) +[两个数组的交集 II-350](https://github.com/sl1673495/leetcode-javascript/issues/37) -[子集-78](https://github.com/sl1673495/leetcode-javascript/issues/71) +### BFS -[组合-77](https://github.com/sl1673495/leetcode-javascript/issues/70) +[跳跃游戏 IV-1345](https://github.com/sl1673495/leetcode-javascript/issues/103) -[全排列 II-47](https://github.com/sl1673495/leetcode-javascript/issues/69) +[跳跃游戏 III-1306](https://github.com/sl1673495/leetcode-javascript/issues/102) -[全排列-46](https://github.com/sl1673495/leetcode-javascript/issues/68) +[二叉树的最小深度-111](https://github.com/sl1673495/leetcode-javascript/issues/54) -[分割回文串-131](https://github.com/sl1673495/leetcode-javascript/issues/67) +[二叉树的最大深度-104](https://github.com/sl1673495/leetcode-javascript/issues/53) -[复原 IP 地址-93](https://github.com/sl1673495/leetcode-javascript/issues/66) +[二叉树的右视图-199](https://github.com/sl1673495/leetcode-javascript/issues/52) -[电话号码的字母组合-17](https://github.com/sl1673495/leetcode-javascript/issues/65) +[二叉树的层序遍历-102](https://github.com/sl1673495/leetcode-javascript/issues/30) -### 贪心算法 +[相同的树-100](https://github.com/sl1673495/leetcode-javascript/issues/21) -[判断子序列-392](https://github.com/sl1673495/leetcode-javascript/issues/89) +### 排序 -[分发饼干-455](https://github.com/sl1673495/leetcode-javascript/issues/88) +[最长单词-面试题 17.15](https://github.com/sl1673495/leetcode-javascript/issues/99) -[买卖股票的最佳时机 II-122](https://github.com/sl1673495/leetcode-javascript/issues/20) +[通过删除字母匹配到字典里最长单词-524](https://github.com/sl1673495/leetcode-javascript/issues/98) -### 例题详解 +[快速排序](https://github.com/sl1673495/leetcode-javascript/issues/41) -[分发饼干-455](https://github.com/sl1673495/leetcode-javascript/issues/88) +[颜色分类-75](https://github.com/sl1673495/leetcode-javascript/issues/28) -[N 皇后-51](https://github.com/sl1673495/leetcode-javascript/issues/78) +### 链表 -[单词搜索-79](https://github.com/sl1673495/leetcode-javascript/issues/77) +[移除链表元素-203](https://github.com/sl1673495/leetcode-javascript/issues/97) -[二进制手表-401](https://github.com/sl1673495/leetcode-javascript/issues/76) +[两数相加-3](https://github.com/sl1673495/leetcode-javascript/issues/94) -[电话号码的字母组合-17](https://github.com/sl1673495/leetcode-javascript/issues/65) +[两两交换链表中的节点-24](https://github.com/sl1673495/leetcode-javascript/issues/51) -[二叉树的所有路径-257](https://github.com/sl1673495/leetcode-javascript/issues/59) +[删除链表的倒数第N个节点-19](https://github.com/sl1673495/leetcode-javascript/issues/46) -[路径总和-112](https://github.com/sl1673495/leetcode-javascript/issues/57) +[删除链表的节点-面试题18](https://github.com/sl1673495/leetcode-javascript/issues/40) -[两两交换链表中的节点-24](https://github.com/sl1673495/leetcode-javascript/issues/51) +[反转链表II-92](https://github.com/sl1673495/leetcode-javascript/issues/39) -[无重复字符的最长子串-3](https://github.com/sl1673495/leetcode-javascript/issues/42) +[反转链表 206](https://github.com/sl1673495/leetcode-javascript/issues/38) -[二分查找-704](https://github.com/sl1673495/leetcode-javascript/issues/23) +### 贪心算法 -[背包(01 背包)](https://github.com/sl1673495/leetcode-javascript/issues/15) +[判断子序列-392](https://github.com/sl1673495/leetcode-javascript/issues/89) -[盛水最多的容器-11](https://github.com/sl1673495/leetcode-javascript/issues/3) +[分发饼干-455](https://github.com/sl1673495/leetcode-javascript/issues/88) -[斐波那契数-509](https://github.com/sl1673495/leetcode-javascript/issues/2) +[买卖股票的最佳时机 II-122](https://github.com/sl1673495/leetcode-javascript/issues/20) ### DFS @@ -203,18 +254,12 @@ [二叉树的最大深度-104](https://github.com/sl1673495/leetcode-javascript/issues/53) -[二叉树的层序遍历](https://github.com/sl1673495/leetcode-javascript/issues/30) +[二叉树的层序遍历-102](https://github.com/sl1673495/leetcode-javascript/issues/30) [路径总和 II-113](https://github.com/sl1673495/leetcode-javascript/issues/27) [相同的树-100](https://github.com/sl1673495/leetcode-javascript/issues/21) -[打家劫舍 |||-337](https://github.com/sl1673495/leetcode-javascript/issues/11) - -[被围绕的区域-130](https://github.com/sl1673495/leetcode-javascript/issues/6) - -[岛屿的最大面积-695](https://github.com/sl1673495/leetcode-javascript/issues/5) - ### 二叉树 [二叉树的最近公共祖先-236](https://github.com/sl1673495/leetcode-javascript/issues/64) @@ -245,26 +290,12 @@ [二叉树的前序遍历-144](https://github.com/sl1673495/leetcode-javascript/issues/50) -[二叉树的层序遍历](https://github.com/sl1673495/leetcode-javascript/issues/30) +[二叉树的层序遍历-102](https://github.com/sl1673495/leetcode-javascript/issues/30) [路径总和 II-113](https://github.com/sl1673495/leetcode-javascript/issues/27) [相同的树-100](https://github.com/sl1673495/leetcode-javascript/issues/21) -### BFS - -[二叉树的最小深度-111](https://github.com/sl1673495/leetcode-javascript/issues/54) - -[二叉树的最大深度-104](https://github.com/sl1673495/leetcode-javascript/issues/53) - -[二叉树的右视图-199](https://github.com/sl1673495/leetcode-javascript/issues/52) - -[二叉树的层序遍历](https://github.com/sl1673495/leetcode-javascript/issues/30) - -[相同的树-100](https://github.com/sl1673495/leetcode-javascript/issues/21) - -[在每个树行中找最大值-515](https://github.com/sl1673495/leetcode-javascript/issues/4) - ### 栈和队列 [二叉树的右视图-199](https://github.com/sl1673495/leetcode-javascript/issues/52) @@ -289,22 +320,10 @@ [长度最小的子数组-209](https://github.com/sl1673495/leetcode-javascript/issues/36) -### 排序 - -[快速排序](https://github.com/sl1673495/leetcode-javascript/issues/41) - -[颜色分类-75](https://github.com/sl1673495/leetcode-javascript/issues/28) - -### 查找表 - -[两个数组的交集 II-350](https://github.com/sl1673495/leetcode-javascript/issues/37) - ### 数据结构 [LRU 缓存机制-146](https://github.com/sl1673495/leetcode-javascript/issues/35) -[实现 Trie (前缀树)-208](https://github.com/sl1673495/leetcode-javascript/issues/14) - ### 二分查找 [Pow(x, n)-50](https://github.com/sl1673495/leetcode-javascript/issues/25) From 123f28c842f9ea892a265b99db6fc3a05c193285 Mon Sep 17 00:00:00 2001 From: ssh <949589855@qq.com> Date: Sun, 26 Sep 2021 16:52:34 +0800 Subject: [PATCH 08/11] Update README.md --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 78e30a6..f7924e9 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,11 @@ > 力扣的题解记录(JavaScript) +## 关于我 +大家好,我是 ssh,现在在字节跳动的 Web Infra 担任前端工程师。 + +我会在公众号「**[前端从进阶到入院](https://user-gold-cdn.xitu.io/2020/4/5/17149ccf687b7699?w=910&h=436&f=jpeg&s=78195)**」每日更新精心挑选的技术文章(标准就是我自己看了也会有收获),欢迎大家一起成长。 + ## 调试 提供了 .vscode 配置文件,在 vscode 中选择「小爬虫」图标,点击启动程序,即可启动断点调试。 From 1050a5b690d95b4fec4333a5e84c533538b65ef9 Mon Sep 17 00:00:00 2001 From: ssh <949589855@qq.com> Date: Sun, 26 Sep 2021 16:54:18 +0800 Subject: [PATCH 09/11] Update README.md --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f7924e9..0fee2c7 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,9 @@ ## 关于我 大家好,我是 ssh,现在在字节跳动的 Web Infra 担任前端工程师。 -我会在公众号「**[前端从进阶到入院](https://user-gold-cdn.xitu.io/2020/4/5/17149ccf687b7699?w=910&h=436&f=jpeg&s=78195)**」每日更新精心挑选的技术文章(标准就是我自己看了也会有收获),欢迎大家一起成长。 +我会在公众号「前端从进阶到入院」每日更新精心挑选的技术文章(标准就是我自己看了也会有收获),欢迎大家一起成长。 + +![qrcode_for_gh_d2b31290dd8b_258](https://user-images.githubusercontent.com/23615778/134800856-9a44fa9a-4f1b-4884-a0b6-b58c5f3331df.jpg) ## 调试 From 904ac79bf001c9698dd63cefafa7fb8f0f1ca29d Mon Sep 17 00:00:00 2001 From: ssh <949589855@qq.com> Date: Sat, 9 Oct 2021 16:37:56 +0800 Subject: [PATCH 10/11] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0fee2c7..5e4db69 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ > 力扣的题解记录(JavaScript) ## 关于我 -大家好,我是 ssh,现在在字节跳动的 Web Infra 担任前端工程师。 +大家好,我是 ssh,现在在字节跳动的 Web Infra 担任前端工程师,微信:**[sshsunlight](https://p1-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/017d568dc1d14cd883cc3238350a39ec~tplv-k3u1fbpfcp-watermark.image)**,欢迎找我交个朋友。 我会在公众号「前端从进阶到入院」每日更新精心挑选的技术文章(标准就是我自己看了也会有收获),欢迎大家一起成长。 From 402a8872548bda7c1cc7d56096889d526e51fcb3 Mon Sep 17 00:00:00 2001 From: ssh <949589855@qq.com> Date: Wed, 28 Jun 2023 21:17:25 +0800 Subject: [PATCH 11/11] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5e4db69..11f4963 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ ## 关于我 大家好,我是 ssh,现在在字节跳动的 Web Infra 担任前端工程师,微信:**[sshsunlight](https://p1-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/017d568dc1d14cd883cc3238350a39ec~tplv-k3u1fbpfcp-watermark.image)**,欢迎找我交个朋友。 -我会在公众号「前端从进阶到入院」每日更新精心挑选的技术文章(标准就是我自己看了也会有收获),欢迎大家一起成长。 +一些算法相关的资料,我放在「前端从进阶到入院」公众号里了,回复「资料」即可获取。 ![qrcode_for_gh_d2b31290dd8b_258](https://user-images.githubusercontent.com/23615778/134800856-9a44fa9a-4f1b-4884-a0b6-b58c5f3331df.jpg)