MCPcopy Create free account
hub / github.com/TheAlgorithms/Go / NewSingly

Function NewSingly

structure/linkedlist/singlylinkedlist.go:19–21  ·  view source on GitHub ↗

NewSingly returns a new instance of a linked list

()

Source from the content-addressed store, hash-verified

17
18// NewSingly returns a new instance of a linked list
19func NewSingly[T any]() *Singly[T] {
20 return &Singly[T]{}
21}
22
23// AddAtBeg adds a new snode with given value at the beginning of the list.
24func (ll *Singly[T]) AddAtBeg(val T) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected