Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NestedInteger ¶
type NestedInteger struct{}
func (*NestedInteger) Add ¶
func (nList *NestedInteger) Add(elem NestedInteger)
Add adds `nList` to hold a nested list and adds a nested integer to it.
func (*NestedInteger) GetInteger ¶
func (nList *NestedInteger) GetInteger() int
GetInteger returns the single integer that `nList holds, if it holds a single integer. The result is undefined if `nList` holds a nested list.
func (*NestedInteger) GetList ¶
func (nList *NestedInteger) GetList() []*NestedInteger
GetList returns the nested list that `nList` holds, if it holds a nested list. The list length is zero if this NestedInteger holds a single integer.
func (*NestedInteger) IsInteger ¶
func (nList *NestedInteger) IsInteger() bool
IsInteger returns `true` if `nList` holds a single integer, rather than a nested list.
func (*NestedInteger) SetInteger ¶
func (nList *NestedInteger) SetInteger(value int)
SetInteger sets `nList` to hold a single integer.
type NestedIterator ¶
type NestedIterator struct {
// contains filtered or unexported fields
}
func Constructor ¶
func Constructor(nestedList []*NestedInteger) *NestedIterator
func (*NestedIterator) HasNext ¶
func (iter *NestedIterator) HasNext() bool
func (*NestedIterator) Next ¶
func (iter *NestedIterator) Next() int
Click to show internal directories.
Click to hide internal directories.