utils

package
v0.0.0-...-250739b Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const NULL = -99999

Variables

View Source
var NewListNode = structure.NewListNode

Functions

func InArray

func InArray(x any, arr any) bool

func SortSlice

func SortSlice(x any)

func ToArray

func ToArray(head *ListNode) (ret []int)

func TreeToArray

func TreeToArray(root *TreeNode, ret *[]int)

Types

type ListNode

type ListNode = structure.ListNode

func GenSingly

func GenSingly(nums []int) (head *ListNode)

type TreeNode

type TreeNode = structure.TreeNode

func GenTree

func GenTree(nums []int) (root *TreeNode)

func SearchNode

func SearchNode(root *TreeNode, val int) *TreeNode

Jump to

Keyboard shortcuts

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