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

Struct Node

structure/linkedlist/shared.go:5–9  ·  view source on GitHub ↗

Node Structure representing the linkedlist node. This node is shared across different implementations.

Source from the content-addressed store, hash-verified

3// Node Structure representing the linkedlist node.
4// This node is shared across different implementations.
5type Node[T any] struct {
6 Val T
7 Prev *Node[T]
8 Next *Node[T]
9}
10
11// Create new node.
12func NewNode[T any](val T) *Node[T] {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected