backtrack

package
v0.0.0-...-3ddf70f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 26, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CombinationSum1

func CombinationSum1(candidates []int, target int) (ans [][]int)

func LetterCombinations1

func LetterCombinations1(digits string) (ans []string)

回溯例题

func LetterCombinations2

func LetterCombinations2(digits string) (ans []string)

因为最终结果的长度一定是 n -> 通过 DFS 形成决策树

func Partition

func Partition(s string) (ans [][]string)

func Permute1

func Permute1(nums []int) (ans [][]int)

func Permute2

func Permute2(nums []int) (ans [][]int)

利用下一个更大排列的解法

func Subsets

func Subsets(nums []int) (ans [][]int)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL