index

package module
v0.0.0-...-a832aeb Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2023 License: MulanPSL-2.0 Imports: 2 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Serialize

func Serialize(root *TreeNode) string

Types

type Codec

type Codec struct {
}

func Constructor

func Constructor() Codec

type TreeNode

type TreeNode struct {
	Val   int
	Left  *TreeNode
	Right *TreeNode
}

func Deserialize

func Deserialize(data string) *TreeNode

func TreeNodeInterFaceToStruct

func TreeNodeInterFaceToStruct(n TreeNodeInterFace) *TreeNode

func (*TreeNode) GetLeft

func (t *TreeNode) GetLeft() TreeNodeInterFace

func (*TreeNode) GetRight

func (t *TreeNode) GetRight() TreeNodeInterFace

func (*TreeNode) GetVal

func (t *TreeNode) GetVal() int

func (*TreeNode) SetLeft

func (t *TreeNode) SetLeft(n TreeNodeInterFace)

func (*TreeNode) SetRight

func (t *TreeNode) SetRight(n TreeNodeInterFace)

func (*TreeNode) SetVal

func (t *TreeNode) SetVal(val int)

type TreeNodeInterFace

type TreeNodeInterFace interface {
	GetVal() int
	SetVal(int)
	GetLeft() TreeNodeInterFace
	SetLeft(TreeNodeInterFace)
	GetRight() TreeNodeInterFace
	SetRight(TreeNodeInterFace)
}

func TreeNodeConstructor

func TreeNodeConstructor() TreeNodeInterFace

Jump to

Keyboard shortcuts

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