algorithm

package
v0.0.0-...-a52c104 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LeftRightBound

func LeftRightBound(nums []int) int

LeftRightBound 找左子树的右边界

func PrintLine

func PrintLine(m [][]int, a, b, c, d int, upper bool)

func PrintMatrixZigZag

func PrintMatrixZigZag(matrix [][]int)

PrintMatrixZigZag 旋转打印矩形

func Rotate

func Rotate(s [][]int) [][]int

Rotate 给一个正方形 N*N 矩阵, 求旋转之后的, 原地调整; no idea; T1: 顺时针旋转90度正方形, 原地调整

func RotateEdge

func RotateEdge(s [][]int, a, b, c, d int) [][]int

func TailTraverse

func TailTraverse(t *TreeNode)

TailTraverse 后续遍历

Types

type TreeNode

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

func RecoverSearchTree

func RecoverSearchTree(nums []int) *TreeNode

RecoverSearchTree 搜索二叉树 给 后序遍历的数组 重归成搜索树 返回头节点 左-右-根 字节面试题;

Jump to

Keyboard shortcuts

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