Documentation ¶
Overview ¶
Package stack implements a stack data structure.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Stack ¶
type Stack struct {
// contains filtered or unexported fields
}
Stack represents a stack data structure. The zero value for Stack is an empty stack ready to use.
func (*Stack) Peek ¶
Peek returns the top element of the stack without removing it or nil if the stack is empty. The second parameter is false if the stack is empty, otherwise it is true.
Click to show internal directories.
Click to hide internal directories.