linkedlist

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

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
}

LinkedList 链表

func NewLinkedList

func NewLinkedList() *LinkedList

NewLinkedList 初始化一个链表

func (*LinkedList) Delete

func (list *LinkedList) Delete(index int) bool

Delete 删除指定位置的元素

func (*LinkedList) Find

func (list *LinkedList) Find(index int) interface{}

Find 查找指定位置的元素

func (*LinkedList) Insert

func (list *LinkedList) Insert(index int, value interface{}) bool

Insert 在指定位置插入一个元素

func (*LinkedList) InsertToHead

func (list *LinkedList) InsertToHead(value interface{}) bool

InsertToHead 在头部插入一个元素

func (*LinkedList) InsertToTail

func (list *LinkedList) InsertToTail(value interface{}) bool

InsertToTail 在尾部插入一个元素

func (*LinkedList) IsEmpty

func (list *LinkedList) IsEmpty() bool

IsEmpty 判断链表是否为空

func (*LinkedList) String

func (list *LinkedList) String() string

Jump to

Keyboard shortcuts

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