Documentation ¶
Index ¶
- Variables
- func CopySlice[T comparable](s []T) []T
- func HasDuplicate[T comparable](s []T) bool
- func SameList(a, b *ListNode) bool
- func SameTree(a, b *TreeNode) bool
- func SliceContain[T comparable](s []T, v T) bool
- type IntValue
- type ListNode
- type NTreeNode
- type NestedInteger
- type TestCase
- func (tc *TestCase[I, E]) ConfigSetCheckFunc(fn func(a, b E) bool)
- func (tc *TestCase[I, E]) ConfigSetOutputInAnyOrder()
- func (tc *TestCase[I, E]) GetExpect() E
- func (tc *TestCase[I, E]) GetInput() I
- func (tc *TestCase[I, E]) RunTest()
- func (tc *TestCase[I, E]) SetAndRun(input I, expect E)
- func (tc *TestCase[I, E]) SetExpect(v E)
- func (tc *TestCase[I, E]) SetInput(v I)
- type TreeNode
Constants ¶
This section is empty.
Variables ¶
View Source
var Log = golog.New("leetcode", golog.OptLevelFromEnv())
Functions ¶
func CopySlice ¶
func CopySlice[T comparable](s []T) []T
func HasDuplicate ¶
func HasDuplicate[T comparable](s []T) bool
func SliceContain ¶
func SliceContain[T comparable](s []T, v T) bool
Types ¶
type NTreeNode ¶
func MakeNaryTree ¶
func MakeNaryTree(v ...interface{}) *NTreeNode
type NestedInteger ¶
type NestedInteger struct {
// contains filtered or unexported fields
}
func MakeNestedInteger ¶
func MakeNestedInteger(v int) *NestedInteger
func MakeNestedIntegerList ¶
func MakeNestedIntegerList(v ...int) *NestedInteger
func (*NestedInteger) Add ¶
func (this *NestedInteger) Add(elem *NestedInteger) *NestedInteger
func (NestedInteger) GetInteger ¶
func (this NestedInteger) GetInteger() int
func (NestedInteger) GetList ¶
func (this NestedInteger) GetList() []*NestedInteger
func (NestedInteger) IsInteger ¶
func (this NestedInteger) IsInteger() bool
func (*NestedInteger) SetInteger ¶
func (this *NestedInteger) SetInteger(value int)
type TestCase ¶
type TestCase[I, E any] struct { // contains filtered or unexported fields }
func (*TestCase[I, E]) ConfigSetCheckFunc ¶
func (*TestCase[I, E]) ConfigSetOutputInAnyOrder ¶
func (tc *TestCase[I, E]) ConfigSetOutputInAnyOrder()
type TreeNode ¶
func MakeBinaryTree ¶
func MakeBinaryTree(v ...interface{}) *TreeNode
Click to show internal directories.
Click to hide internal directories.