View source: R/40-priority_queue-queue-ops.R
| peek_max | R Documentation |
Returns the element at the maximum priority without modifying the queue.
peek_max(x)
x |
A |
Ties are stable: when multiple elements share maximum priority, this returns the earliest element in queue order.
Element at maximum priority, or NULL when x is empty.
x <- priority_queue("a", "b", "c", priorities = c(2, 3, 3))
peek_max(x)
peek_max(priority_queue())
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.