Documentation ¶
Index ¶
- type LinkedList
- func (l *LinkedList) Add(index int, e interface{})
- func (l *LinkedList) AddFirst(e interface{})
- func (l *LinkedList) AddLast(e interface{})
- func (l *LinkedList) Contains(e interface{}) bool
- func (l *LinkedList) Get(index int) interface{}
- func (l *LinkedList) GetFirst() interface{}
- func (l *LinkedList) GetLast() interface{}
- func (l *LinkedList) GetSize() int
- func (l *LinkedList) IsEmpty() bool
- func (l *LinkedList) Remove(index int) interface{}
- func (l *LinkedList) RemoveFirst()
- func (l *LinkedList) RemoveLast()
- func (l *LinkedList) Set(index int, e interface{})
- func (l *LinkedList) String() string
- type Node
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(0-based)位置添加新的元素e 在链表中不是一个常用的操作,练习用:)
func (*LinkedList) Get ¶
func (l *LinkedList) Get(index int) interface{}
获得链表的第index(0-based)个位置的元素 在链表中不是一个常用的操作,练习用:)
func (*LinkedList) Remove ¶
func (l *LinkedList) Remove(index int) interface{}
从链表中删除index(0-based)位置的元素,返回删除的元素 在链表中不是一个常用的操作,练习用:)
func (*LinkedList) Set ¶
func (l *LinkedList) Set(index int, e interface{})
修改链表的第index(0-based)个位置的元素为e 在链表中不是一个常用的操作,练习用:)
func (*LinkedList) String ¶
func (l *LinkedList) String() string
Click to show internal directories.
Click to hide internal directories.