set

package
v1.1.10 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Subsets added in v1.1.10

func Subsets(nums []int64) [][]int64

幂集。编写一种方法,返回某集合的所有子集。集合中不包含重复的元素。 说明:解集不能包含重复的子集。 https://leetcode-cn.com/problems/power-set-lcci/

Types

type StringSet

type StringSet struct {
	// contains filtered or unexported fields
}

func NewStringSet

func NewStringSet() *StringSet

func (*StringSet) Add

func (ss *StringSet) Add(val string)

func (*StringSet) BatchAdd

func (ss *StringSet) BatchAdd(vals ...string)

func (*StringSet) Delete

func (ss *StringSet) Delete(val string)

func (*StringSet) Has

func (ss *StringSet) Has(val string) bool

func (*StringSet) Size

func (ss *StringSet) Size() int

func (*StringSet) String

func (ss *StringSet) String() string

func (*StringSet) ToArray

func (ss *StringSet) ToArray() []string

Jump to

Keyboard shortcuts

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