Documentation ¶
Index ¶
- type LinkedList
- func (l *LinkedList) Add(k int, v interface{})
- func (l *LinkedList) Contains(k int) bool
- func (l *LinkedList) Get(index int) interface{}
- func (l *LinkedList) IsEmpty() bool
- func (l *LinkedList) Len() int
- func (l *LinkedList) Remove(index int) interface{}
- func (l *LinkedList) Set(index int, e interface{})
- func (l *LinkedList) String() string
- type LinkedListMap
- func (m *LinkedListMap) Add(k int, v interface{})
- func (m *LinkedListMap) Contains(i int) bool
- func (m *LinkedListMap) Get(i int) interface{}
- func (m *LinkedListMap) IsEmpty() bool
- func (m *LinkedListMap) Len() int
- func (m *LinkedListMap) Remove(i int) interface{}
- func (m *LinkedListMap) Set(k int, v interface{})
- type ListNode
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 NewLinkedList ¶
func NewLinkedList() *LinkedList
func (*LinkedList) Contains ¶
func (l *LinkedList) Contains(k int) bool
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) Set ¶
func (l *LinkedList) Set(index int, e interface{})
func (*LinkedList) String ¶
func (l *LinkedList) String() string
type LinkedListMap ¶
type LinkedListMap struct {
// contains filtered or unexported fields
}
基于linkedlist实现的Map
func (*LinkedListMap) Add ¶
func (m *LinkedListMap) Add(k int, v interface{})
func (*LinkedListMap) Contains ¶
func (m *LinkedListMap) Contains(i int) bool
func (*LinkedListMap) Get ¶
func (m *LinkedListMap) Get(i int) interface{}
func (*LinkedListMap) IsEmpty ¶
func (m *LinkedListMap) IsEmpty() bool
func (*LinkedListMap) Len ¶
func (m *LinkedListMap) Len() int
func (*LinkedListMap) Remove ¶
func (m *LinkedListMap) Remove(i int) interface{}
func (*LinkedListMap) Set ¶
func (m *LinkedListMap) Set(k int, v interface{})
Click to show internal directories.
Click to hide internal directories.