Well sorry, i didn't realise that it's possible to not see answers to your own question. I untagged spoiler.
Your solution itself should have 36 or less characters. New lines and spaces count as characters too.
That's already in the description.
The first parameter will contain the count of each race on the side of good in the following order: Hobbits, Men, Elves, Dwarves, Eagles, Wizards.
The first parameter will contain the count of each race on the side of good in the following order:
Hobbits, Men, Elves, Dwarves, Eagles, Wizards.
So you can't have "Hobbits, Hobbits,....."
"Hobbits, Hobbits,....."
Better how? What is missing?
Hello. you have a nested for loop so that makes the complexity of your function O(n^2). Try to iterate over the string once or twice and think what you need to calculate during each step.
Loading collection data...
Well sorry, i didn't realise that it's possible to not see answers to your own question. I untagged spoiler.
Your solution itself should have 36 or less characters. New lines and spaces count as characters too.
That's already in the description.
So you can't have
"Hobbits, Hobbits,....."
Better how? What is missing?
Hello. you have a nested for loop so that makes the complexity of your function O(n^2). Try to iterate over the string once or twice and think what you need to calculate during each step.