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

Method IsEmpty

structure/stack/stacklinkedlist.go:49–51  ·  view source on GitHub ↗

isEmpty to check our array is empty or not

()

Source from the content-addressed store, hash-verified

47
48// isEmpty to check our array is empty or not
49func (ll *Stack) IsEmpty() bool {
50 return ll.length == 0
51}
52
53// len use to return length of our stack
54func (ll *Stack) Length() int {

Callers 2

TestStackLinkedListFunction · 0.95
TestStackArrayFunction · 0.95

Calls

no outgoing calls

Tested by 2

TestStackLinkedListFunction · 0.76
TestStackArrayFunction · 0.76