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

Method Length

structure/stack/stacklinkedlist.go:54–56  ·  view source on GitHub ↗

len use to return length of our stack

()

Source from the content-addressed store, hash-verified

52
53// len use to return length of our stack
54func (ll *Stack) Length() int {
55 return ll.length
56}
57
58// peak return last input value
59func (ll *Stack) Peek() any {

Callers 2

TestStackLinkedListFunction · 0.95
TestStackArrayFunction · 0.95

Calls

no outgoing calls

Tested by 2

TestStackLinkedListFunction · 0.76
TestStackArrayFunction · 0.76