Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IndexPriorityQueue ¶
type IndexPriorityQueue[T any] interface { // Size gets number of elements in a queue. Size() int // Insert adds element to a queue. Insert(key int, element T) // Remove removes element from a queue. Remove() (T, int) // Peek returns first element of a queue. Peek() T // RemoveByKey removes element by key. RemoveByKey(key int) T // PeekKey returns first element key. PeekKey() int // HasKey tells if key exists. HasKey(key int) bool }
IndexPriorityQueue is index priority queue data structure.
func New ¶
func New[T any](less LessFunc[T]) IndexPriorityQueue[T]
New creates instance of IndexPriorityQueue
Click to show internal directories.
Click to hide internal directories.