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

Function NewCyclic

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

Create new list.

()

Source from the content-addressed store, hash-verified

10
11// Create new list.
12func NewCyclic[T any]() *Cyclic[T] {
13 return &Cyclic[T]{}
14}
15
16// Inserting the first node is a special case. It will
17// point to itself. For other cases, the node will be added

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected