Harry Potter is trying to solve a challenge to open a door in Azkaban. He must discover the secret spell combination that is hidden in the spell book. To do this, he must order the spells: the list of spells must be arranged according to the first letter in descending order.
What is the list of spells needed to open the door?
Custom sort order for collection
The secret is inside the spell?
Report a typo
Sample Input 1:
Expecto Patronum Alohomora Expelliarmus LumosSample Output 1:
[Patronum, Lumos, Expelliarmus, Expecto, Alohomora]Write a program in Kotlin
/* Do not change code below */
fun main() {
val list = readln().split(" ")
// write your code here
val res =
println(res)
}
___
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.