mirror of
https://github.com/krahets/hello-algo.git
synced 2026-08-18 14:30:58 +00:00
Fix multilingual content typos (#1958)
This commit is contained in:
@@ -30,7 +30,7 @@
|
||||
|
||||
为了实现每个元素只被选择一次,我们考虑引入一个布尔型数组 `selected` ,其中 `selected[i]` 表示 `choices[i]` 是否已被选择,并基于它实现以下剪枝操作。
|
||||
|
||||
- 在做出选择 `choice[i]` 后,我们就将 `selected[i]` 赋值为 $\text{True}$ ,代表它已被选择。
|
||||
- 在做出选择 `choices[i]` 后,我们就将 `selected[i]` 赋值为 $\text{True}$ ,代表它已被选择。
|
||||
- 遍历选择列表 `choices` 时,跳过所有已被选择的节点,即剪枝。
|
||||
|
||||
如下图所示,假设我们第一轮选择 1 ,第二轮选择 3 ,第三轮选择 2 ,则需要在第二轮剪掉元素 1 的分支,在第三轮剪掉元素 1 和元素 3 的分支。
|
||||
|
||||
Reference in New Issue
Block a user