You have a list of first names of your students. Please return a list with the names following the LIFO strategy.
ArrayDeque
List of names
Report a typo
Sample Input 1:
john jane joe jill packSample Output 1:
pack jill joe jane johnWrite a program in Kotlin
fun processNamesLIFO(names: ArrayDeque<String>): ArrayDeque<String> {
val outputStack = ArrayDeque<String>()
// make your code here
return outputStack
}
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.