MCPcopy Create free account
hub / github.com/careercup/ctci / Init

Method Init

go/chapter02/stack/stack.go:21–25  ·  view source on GitHub ↗

Init initializes or clears list l.

()

Source from the content-addressed store, hash-verified

19
20// Init initializes or clears list l.
21func (s *Stack) Init() *Stack {
22 //s.top.next = &s.top
23 s.size = 0
24 return s
25}
26
27func (s *Stack) Length() int {
28 return s.size

Callers 1

NewFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected