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

Method Show

structure/stack/stacklinkedlist.go:64–72  ·  view source on GitHub ↗

show all value as an interface array

()

Source from the content-addressed store, hash-verified

62
63// show all value as an interface array
64func (ll *Stack) Show() (in []any) {
65 current := ll.top
66
67 for current != nil {
68 in = append(in, current.Val)
69 current = current.Next
70 }
71 return
72}

Callers 1

TestStackLinkedListFunction · 0.95

Calls

no outgoing calls

Tested by 1

TestStackLinkedListFunction · 0.76