Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Stack ¶
type Stack[E comparable, S ~[]*E] interface { Push(value E) Pop() (E, error) Peek() E Contains(value E) bool Len() int Cap() int }
Stack is a LIFO sequential access data structure. Access O(n) Search O(n) * Insert O(1) * Delete O(1)
func New ¶
func New[E comparable, S ~[]*E](capacity int) Stack[E, S]
Click to show internal directories.
Click to hide internal directories.