MCPcopy Create free account
hub / github.com/ardanlabs/gotraining / Count

Method Count

topics/go/algorithms/data/stack/stack.go:29–31  ·  view source on GitHub ↗

Count returns the number of items in the stack.

()

Source from the content-addressed store, hash-verified

27
28// Count returns the number of items in the stack.
29func (s *Stack) Count() int {
30 return len(s.data)
31}
32
33// Push adds data into the top of the stack.
34func (s *Stack) Push(data *Data) {

Callers 2

TestPushFunction · 0.95
TestPopFunction · 0.95

Calls

no outgoing calls

Tested by 2

TestPushFunction · 0.76
TestPopFunction · 0.76