Documentation
¶
Index ¶
- type List
- func (list *List[T]) Clear()
- func (list *List[T]) Head() *Node[T]
- func (list *List[T]) InsertAfter(val T, node *Node[T]) *Node[T]
- func (list *List[T]) Len() int
- func (list *List[T]) PopFront() *Node[T]
- func (list *List[T]) PushBack(val T)
- func (list *List[T]) PushFront(val T)
- func (list *List[T]) Remove(prev, node *Node[T]) *Node[T]
- func (list *List[T]) SetHead(prev, node *Node[T])
- func (list *List[T]) SetTail(prev, node *Node[T])
- func (list *List[T]) String() string
- func (list *List[T]) Tail() *Node[T]
- type Node
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type List ¶
type List[T any] struct { // contains filtered or unexported fields }
Unidirectional(Singly) Linked List
func (*List[T]) InsertAfter ¶
Inserts a new node after the given node
func (*List[T]) Remove ¶
Removes the given node prev MUST be right before the node, otherwise list.len will miscount
Click to show internal directories.
Click to hide internal directories.