-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
238 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
title: 连续这么多手写,需要复盘和回归 | ||
order: 19 | ||
group: | ||
order: 0 | ||
title: interview | ||
nav: | ||
order: 3 | ||
title: 'interview' | ||
path: /interview | ||
--- | ||
|
||
连续翻越前面几座大山,有什么收获吗?其实并没有 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,55 @@ | ||
/** | ||
* 1.利用正则筛选只包含大小写字母的字符串 | ||
* 2.Object.assign(target, ...source) | ||
* 3.两个数组的交集 | ||
* 4.字符串转换整数 | ||
* 5.字符串压缩 | ||
* 6.单词搜索 | ||
* 7.版本号进行排序 | ||
* 8.每日温度 | ||
* 9.最长连续重复子串 | ||
* 10.零钱兑换II | ||
*/ | ||
|
||
function myAssign(target, ...source) { | ||
if (typeof target != 'object') { | ||
throw new TypeError('error'); | ||
} | ||
source.forEach((item) => { | ||
if (Object.keys(item).length) { | ||
for (let key in item) { | ||
if (item.hasOwnProperty(key)) { | ||
target[key] = item[key]; | ||
} | ||
} | ||
} | ||
}); | ||
return target; | ||
} | ||
Object.assign = myAssign; | ||
|
||
// ['Abc', 'DeF', '123', '_ghI']; | ||
function dataF(arr) { | ||
return arr.filter((item) => /^[a-zA-Z]+$/.test(item)).map((item) => item.toUpperCase()); | ||
} | ||
dataF(['Abc', 'DeF', '123', '_ghI']); | ||
/** | ||
* @param {number[]} nums1 | ||
* @param {number[]} nums2 | ||
* @return {number[]} | ||
*/ | ||
var intersection = function (nums1, nums2) { | ||
let a = [...new Set(nums1)]; | ||
let b = [...new Set(nums2)]; | ||
let m = new Map(); | ||
let ans = []; | ||
for (let a1 of a) { | ||
m.set(a1, 1); | ||
} | ||
for (let b1 of b) { | ||
if (m.has(b1)) { | ||
ans.push(b1); | ||
} | ||
} | ||
return ans; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/** | ||
* 1.最小栈 | ||
* 2.最大子序和/最大乘积子数组 | ||
* 3.字符串转换整数 | ||
* 4.判断子序列 | ||
* 5.跳跃游戏II | ||
* 6.单词搜索 | ||
*/ |