mirror of
https://github.com/krahets/hello-algo.git
synced 2026-08-30 11:57:13 +00:00
Fix incorrect method name in permutations_ii.go (#1313)
This commit is contained in:
@@ -23,7 +23,7 @@ func backtrackII(state *[]int, choices *[]int, selected *[]bool, res *[][]int) {
|
|||||||
(*selected)[i] = true
|
(*selected)[i] = true
|
||||||
*state = append(*state, choice)
|
*state = append(*state, choice)
|
||||||
// 进行下一轮选择
|
// 进行下一轮选择
|
||||||
backtrackI(state, choices, selected, res)
|
backtrackII(state, choices, selected, res)
|
||||||
// 回退:撤销选择,恢复到之前的状态
|
// 回退:撤销选择,恢复到之前的状态
|
||||||
(*selected)[i] = false
|
(*selected)[i] = false
|
||||||
*state = (*state)[:len(*state)-1]
|
*state = (*state)[:len(*state)-1]
|
||||||
|
|||||||
Reference in New Issue
Block a user