structures

package
v0.0.0-...-55fa3f2 Latest Latest
Warning

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

Go to latest
Published: May 10, 2022 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NULL = -1 << 63

Functions

func ListToInts

func ListToInts(head *ListNode) []int

func Tree2ints

func Tree2ints(tn *TreeNode) []int

Tree2ints 把 *TreeNode 按照行还原成 []int // Ints2TreeNode 反操作

Types

type ListNode

type ListNode struct {
	Val  int
	Next *ListNode
}

func IntsToList

func IntsToList(nums []int) *ListNode

type TreeNode

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

func Ints2TreeNode

func Ints2TreeNode(ints []int) *TreeNode

Ints2TreeNode 利用 []int 生成 *TreeNode // 按每行从上往下

Jump to

Keyboard shortcuts

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