Last element

Report a typo

Implement a method that accepts a queue and returns its last element.

Write a program in Kotlin
import java.util.Queue

fun getLastNumber(target: Queue<Int>): Int {
// implement
}
___

Create a free account to access the full topic