list

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2022 License: 0BSD Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ListNode

type ListNode struct {
	Val  int
	Next *ListNode
}

Definition for singly-linked list.

func NewRandomCycleList

func NewRandomCycleList() *ListNode

NewRandomList generate a random cycle singly linked list.

func NewRandomList

func NewRandomList() *ListNode

NewRandomList generate a random singly linked list.

func (*ListNode) Length

func (n *ListNode) Length() int

Length return the length of linked list from node n to the tail node.

func (*ListNode) Println

func (n *ListNode) Println() string

Println print all elements from node n to the tail node.

Jump to

Keyboard shortcuts

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