basic

package
v0.0.0-...-fea8992 Latest Latest
Warning

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

Go to latest
Published: May 17, 2022 License: GPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Max

func Max(x int, y int) int

func Min

func Min(x int, y int) int

Types

type NestedInteger

type NestedInteger struct {
}

This is the interface that allows for creating nested lists. You should not implement it, or speculate about its implementation

func (NestedInteger) Add

func (n NestedInteger) Add(elem NestedInteger)

Set this NestedInteger to hold a nested list and adds a nested integer to it.

func (NestedInteger) GetInteger

func (n NestedInteger) GetInteger() int

Return the single integer that this NestedInteger holds, if it holds a single integer The result is undefined if this NestedInteger holds a nested list So before calling this method, you should have a check

func (NestedInteger) GetList

func (n NestedInteger) GetList() []NestedInteger

Return the nested list that this NestedInteger holds, if it holds a nested list The list length is zero if this NestedInteger holds a single integer You can access NestedInteger's List element directly if you want to modify it

func (NestedInteger) IsInteger

func (n NestedInteger) IsInteger() bool

Return true if this NestedInteger holds a single integer, rather than a nested list.

func (NestedInteger) SetInteger

func (n NestedInteger) SetInteger(value int)

Set this NestedInteger to hold a single integer.

Jump to

Keyboard shortcuts

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