final class QueueNode(val value: Int, var next: QueueNode)A null successor terminates the chain. The stored value need not be mutable for a FIFO queue, because enqueue creates a node and dequeue removes one rather than changing its payload.
Articles by others on the same topic
There are currently no matching articles.