Skip to content

Commit

Permalink
feat: 0102
Browse files Browse the repository at this point in the history
  • Loading branch information
niaogege committed Jan 3, 2024
1 parent 4303e86 commit f4e10aa
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
22 changes: 20 additions & 2 deletions docs/interview/experiences/22leetcodeB.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ nav:
* 4.最长公共前缀
* 5.最长公共子序列
* 6.阶乘(迭代/递归/缓存)
* 7.打家劫舍
* 7.打家劫舍I/打家劫舍II
* 8.零钱兑换I/零钱兑换II
* 9.删除链表的节点
* 10.括号生成
Expand All @@ -51,6 +51,7 @@ nav:
* 27.不定长二维数组全排列
* 28.字符串相乘
* 29.完全平方数
* 30.单词拆分
*/
```
Expand Down Expand Up @@ -175,6 +176,10 @@ count3(3);

## 7.打家劫舍

```js

```

## 8.零钱兑换

## 9.[剑指 Offer 18. 删除链表的节点](https://leetcode.cn/problems/shan-chu-lian-biao-de-jie-dian-lcof/)
Expand Down Expand Up @@ -590,5 +595,18 @@ var multiply = function (num1, num2) {
## [29.完全平方数](https://leetcode.cn/problems/perfect-squares/)

```js

function numSquares(n) {
// dp初始化和下标含义
// 递推公式
// 数组初始化
// 遍历顺序
let dp = new Array(n + 1).fill(Infinity);
dp[0] = 0;
for (let i = 1; i * i <= n; i++) {
for (let j = i * i; j <= n; j++) {
dp[j] = Math.min(dp[j], dp[j - i * i] + 1);
}
}
return dp[n];
}
```
2 changes: 1 addition & 1 deletion docs/node/study/2cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ server.listen(3000, () => {
});
```

![Nodejs 7个线程](image.png)
![Nodejs 7个线程](https://s2.loli.net/2024/01/03/hOQ6xibIogZ59S8.png)

创建了 http 服务,开启了一个进程,都说了 Node.js 是单线程,所以大家可能认为 Node 启动后线程数应该为 1,让我们使用 Mac 自带的活动监视器搜索进程 pid 来查看一下具体是几个线程:

Expand Down

0 comments on commit f4e10aa

Please sign in to comment.