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

Function NewNode

structure/linkedlist/shared.go:12–14  ·  view source on GitHub ↗

Create new node.

(val T)

Source from the content-addressed store, hash-verified

10
11// Create new node.
12func NewNode[T any](val T) *Node[T] {
13 return &Node[T]{val, nil, nil}
14}

Callers 4

AddAtBegMethod · 0.70
AddAtEndMethod · 0.70
AddMethod · 0.70
insertValueMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected