MCPcopy Index your code
hub / github.com/TheAlgorithms/Go / IsEmpty

Method IsEmpty

structure/stack/stacklinkedlistwithlist.go:56–60  ·  view source on GitHub ↗

Empty check our stack has value or not

()

Source from the content-addressed store, hash-verified

54
55// Empty check our stack has value or not
56func (sl *SList) IsEmpty() bool {
57 // check our stack is empty or not
58 // if is 0 it means our stack is empty otherwise is not empty
59 return sl.Stack.Len() == 0
60}

Callers 3

PeekMethod · 0.95
PopMethod · 0.95

Calls 1

LenMethod · 0.65

Tested by 1