Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
Index your code
hub
/
github.com/TheAlgorithms/Go
/ Length
Method
Length
structure/stack/stacklinkedlistwithlist.go:51–53 ·
view source on GitHub ↗
Length return length of our stack
()
Source
from the content-addressed store, hash-verified
49
50
// Length return length of our stack
51
func
(sl *SList) Length() int {
52
return
sl.Stack.Len()
53
}
54
55
// Empty check our stack has value or not
56
func
(sl *SList) IsEmpty() bool {
Callers
1
TestStackLinkedListWithList
Function · 0.95
Calls
1
Len
Method · 0.65
Tested by
1
TestStackLinkedListWithList
Function · 0.76