package
Version:
v0.0.0-...-5aae7fa
Opens a new window with list of versions in this module.
Published: Nov 21, 2022
License: MIT
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
type Queue interface {
Enqueue(value interface{})
Dequeue() (interface{}, error)
Peek() (interface{}, error)
Empty() bool
}
Queue represents a collection data structure with FIFO (First In First Out) semantics).
NewQueue returns an empty queue.
type Stack interface {
Push(value interface{})
Pop() (interface{}, error)
Peek() (interface{}, error)
Empty() bool
}
Stack represents a collection data structure with LIFO (Last In First Out) semantics).
NewStack returns an empty stack.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.