MCPcopy Index your code
hub / github.com/0xAX/go-algorithms / New

Function New

stack/stack.go:15–20  ·  view source on GitHub ↗

Initialzes new Stack

()

Source from the content-addressed store, hash-verified

13
14// Initialzes new Stack
15func New() *Stack {
16 var stack *Stack = new(Stack)
17
18 stack.depth = 0
19 return stack
20}
21
22// Pushes a given item into Stack
23func (stack *Stack) Push(item interface{}) {

Callers 1

TestStackFunction · 0.70

Calls

no outgoing calls

Tested by 1

TestStackFunction · 0.56