Documentation
¶
Index ¶
- func FixBrackets(nums string) string
- func StrToByteArray(str string) []byte
- func StrToByteArrayArray(str string) [][]byte
- func StrToIntArrArray(nums string) [][]int
- func StrToIntArray(nums string) []int
- func StrToStringArray(str string) []string
- func StrToStringArrayArray(str string) [][]string
- type Employee
- type ListNode
- type NestedInteger
- type Node
- type TreeNode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FixBrackets ¶
func StrToByteArray ¶
func StrToByteArrayArray ¶
func StrToIntArrArray ¶
func StrToIntArray ¶
func StrToStringArray ¶
func StrToStringArrayArray ¶
Types ¶
type NestedInteger ¶
type NestedInteger struct { }
NestedInteger This is the interface that allows for creating nested lists. You should not implement it, or speculate about its implementation
func StrToNestedIntegerList ¶
func StrToNestedIntegerList(str string) []*NestedInteger
func (*NestedInteger) Add ¶
func (n *NestedInteger) Add(elem NestedInteger)
Add Set this NestedInteger to hold a nested list and adds a nested integer to it.
func (NestedInteger) GetInteger ¶
func (n NestedInteger) GetInteger() int
GetInteger 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
GetList 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
IsInteger Return true if this NestedInteger holds a single integer, rather than a nested list.
func (*NestedInteger) SetInteger ¶
func (n *NestedInteger) SetInteger(value int)
SetInteger Set this NestedInteger to hold a single integer.