linkedlist

package
v0.0.0-...-3b2a8e7 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LinkedList

type LinkedList struct {
	// contains filtered or unexported fields
}

func (*LinkedList) Add

func (l *LinkedList) Add(index int, e interface{})

在链表的index(0-based)位置添加新的元素e 在链表中不是一个常用的操作,练习用:)

func (*LinkedList) AddFirst

func (l *LinkedList) AddFirst(e interface{})

在链表头添加新的元素e

func (*LinkedList) AddLast

func (l *LinkedList) AddLast(e interface{})

在链表末尾添加新的元素e

func (*LinkedList) GetSize

func (l *LinkedList) GetSize() int

获取链表中的元素个数

func (*LinkedList) IsEmpty

func (l *LinkedList) IsEmpty() bool

返回链表是否为空

type Node

type Node struct {
	// contains filtered or unexported fields
}

func (*Node) String

func (n *Node) String() string

Jump to

Keyboard shortcuts

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