binary_search_tree_iterator

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2022 License: MulanPSL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InOrderIterator

func InOrderIterator(ctx context.Context, root *TreeNode) (gen chan int)

func YieldAll

func YieldAll(ctx context.Context, target chan int, source chan int)

func YieldOne

func YieldOne(ctx context.Context, target chan int, source int)

Types

type BSTIterator

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

func Constructor

func Constructor(root *TreeNode) BSTIterator

func (*BSTIterator) HasNext

func (b *BSTIterator) HasNext() bool

func (*BSTIterator) Next

func (b *BSTIterator) Next() int

Jump to

Keyboard shortcuts

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