poll

fun <E> ArrayDeque<E>.poll(): E?

Retrieves and removes the head of this queue, or returns {@code null} if this queue is empty.

Return

the head of this queue, or {@code null} if this queue is empty