Ethan Hunt is ready for another "Mission: Impossible". To disable a chemical weapon, he must type the correct combination. He only knows that the code is obtained in the following way: "the last must be the first". Please print the list with the results to help Ethan disable the weapon.
ArrayDeque
The secret code to save the city?
Report a typo
Sample Input 1:
expetum axio lithigum magnum animaSample Output 1:
[anima, magnum, lithigum, axio, expetum]Write a program in Kotlin
fun getCombination(codes: List<String>): ArrayDeque<String> {
val deque = ArrayDeque<String>()
// make your code here
return deque
}
___
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.