Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrInvalidStackID ¶
func ErrInvalidStackID() error
ErrInvalidStackID is returned if the stack id is not either 0, 1, 2.
Types ¶
type ThreeStacks ¶
type ThreeStacks struct {
// contains filtered or unexported fields
}
ThreeStacks represents 3-stacks using only a single underlying list to store values.
func (*ThreeStacks) Pop ¶
func (ts *ThreeStacks) Pop(stackID int) (interface{}, error)
Pop removes and returns the most recent addition to the given stack.
func (*ThreeStacks) Push ¶
func (ts *ThreeStacks) Push(val interface{}, stackID int) error
Push adds the Value to the top of the given stack.
Click to show internal directories.
Click to hide internal directories.