Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrStackOverflow = errors.New("pila llena")
View Source
var ErrStackUnderflow = errors.New("pila vacia")
Sugerencia: Go Effective
Functions ¶
This section is empty.
Types ¶
type ArrayStack ¶
type ArrayStack struct {
// contains filtered or unexported fields
}
func New ¶
func New(capacidad int) ArrayStack
func (*ArrayStack) Clear ¶
func (pila *ArrayStack) Clear()
func (ArrayStack) IsEmpty ¶
func (pila ArrayStack) IsEmpty() bool
func (ArrayStack) IsFull ¶
func (pila ArrayStack) IsFull() bool
func (*ArrayStack) Pop ¶
func (pila *ArrayStack) Pop() (e int, err error)
func (*ArrayStack) Push ¶
func (pila *ArrayStack) Push(e int) (err error)
func (ArrayStack) Size ¶
func (pila ArrayStack) Size() int
func (ArrayStack) Top ¶
func (pila ArrayStack) Top() (e int, err error)
type Stack ¶
type Stack interface { Clear() // Limpiar la estructura -> O(1) Push(e int) error // Agregar un nuevo elemento (cima) -> O(1) Top() (int, error) // Mostrar el elemento de la cima -> O(1) Pop() (int, error) // Mostrar el elemento de la cima. Remueve la cima actual -> O(1) Size() int // Cantidad de elementos en la pila -> O(1) }
Click to show internal directories.
Click to hide internal directories.