LinkedListQueue

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
open override val count: Int
Link copied to clipboard
open override val isEmpty: Boolean
Link copied to clipboard
Link copied to clipboard
var size: Int

Functions

Link copied to clipboard
open override fun dequeue(): T?

Removes the first element of the queue O(1)

Link copied to clipboard
open override fun enqueue(element: T): Boolean

Adds element at the start of the queue O(1)

Link copied to clipboard
open override fun peek(): T?

Returns the first element of the queue O(1)

Link copied to clipboard
fun <T> Queue<T>.reverse()
Link copied to clipboard
open override fun toString(): String