leetcode_654

package
v0.0.0-...-0616fc3 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2020 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 TreeNode

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

1.依次插入,先选取首项为root 2.接下来每一项:如果小于root,则插入root的右树(insertRight),如果大于root,则选取该点为新root,将原树变为新root的左树(reRoot) 3.实现insertRight与reRoot函数 。

Jump to

Keyboard shortcuts

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