leetcode

package
v0.0.0-...-fdcae39 Latest Latest
Warning

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

Go to latest
Published: May 14, 2023 License: GPL-3.0 Imports: 1 Imported by: 0

README

LeetCode

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// NodeExample1 测试用例1
	NodeExample1 = &Node{
		Val: 0,
		Children: []*Node{
			{Val: 1, Children: []*Node{{Val: 4}, {Val: 5}, {Val: 6}}},
			{Val: 2},
			{Val: 3},
		},
	}
)

Functions

This section is empty.

Types

type ListNode

type ListNode struct {
	Val  int
	Next *ListNode
}

ListNode 链表节点

func NewListNode

func NewListNode(str string) *ListNode

NewListNode 将数组字符串转换成链表

func (*ListNode) Last

func (l *ListNode) Last() *ListNode

Last return latest node

type Node

type Node struct {
	Val      int
	Children []*Node
}

Node N叉树节点

type TreeNode

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

TreeNode 二叉树节点

func NewTreeNode

func NewTreeNode(str string) *TreeNode

NewTreeNode 将数组字符串转换成二叉树

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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