linkedlist

package
v0.0.0-...-73cdf94 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2020 License: MIT Imports: 3 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 New

func New() *LinkedList

func (*LinkedList) Add

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

在链表的index位置添加新的元素e

func (*LinkedList) AddFirst

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

在链表头添加新的元素e

func (*LinkedList) AddLast

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

在链表末尾添加新元素e

func (*LinkedList) Contains

func (l *LinkedList) Contains(e interface{}) bool

func (*LinkedList) Get

func (l *LinkedList) Get(index int) interface{}

获取链表中index位置的元素

func (*LinkedList) GetFirst

func (l *LinkedList) GetFirst() interface{}

func (*LinkedList) GetLast

func (l *LinkedList) GetLast() interface{}

func (*LinkedList) IsEmpty

func (l *LinkedList) IsEmpty() bool

func (*LinkedList) Len

func (l *LinkedList) Len() int

func (*LinkedList) Remove

func (l *LinkedList) Remove(index int) interface{}

func (*LinkedList) RemoveFirst

func (l *LinkedList) RemoveFirst() interface{}

func (*LinkedList) RemoveLast

func (l *LinkedList) RemoveLast() interface{}

func (*LinkedList) Set

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

func (*LinkedList) String

func (l *LinkedList) String() string

type ListNode

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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