flattennestedlistiterator

package
v0.0.0-...-e200468 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2022 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NestedIterator

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

Solution2: use stack

func Constructor

func Constructor(nestedList []*NestedInteger) *NestedIterator

func (*NestedIterator) HasNext

func (n *NestedIterator) HasNext() bool

func (*NestedIterator) Next

func (n *NestedIterator) Next() int

type NestedIterator1

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

Solution1: recursion

func Constructor

func Constructor(nestedList []*NestedInteger) *NestedIterator1

func (*NestedIterator1) HasNext

func (n *NestedIterator1) HasNext() bool

func (*NestedIterator1) Next

func (n *NestedIterator1) Next() int

Jump to

Keyboard shortcuts

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