We were unable to load Disqus. If you are a moderator please see our troubleshooting guide.

BassamElKhoury • 2 weeks ago

Am I the only one who can't run his code? I tried to run it on safari and chrome but the editor is stuck on "waiting" on both browsers

[CG]Thibaud • 2 weeks ago

there was an issue with our infrastructure this weekend. It should be running smoothly now

masxa • 3 weeks ago

I did Generics! Yaaay :) :)

ChrisBamberry • 3 months ago

Is this still accurate on codingame.com? I can't see the link to the GitHub...??

Luc Chauvet • 3 months ago
Ashutosh Sharma • 5 months ago

It would be better if you can add some basic example to explain the problem.
The questions say we have to find the total number of letters in all the names with more than 5 letters

List = {"orange", "apple", "watermelon", "melonbar", "monkeybar"}

the count of the words having letters more than 5 is four in the list i.e. orange, watermelon, melonbar, monkeybar.


"the total number of letter in all the names with more than 5 letters" - will be total of the letters which exceeds 5 in all the names
letters exceeding 5 in all string
orange = 2
apple = 0
watermelon = 5
melonbar = 3
monkeybar = 4

total = 2+0+5+3+4 = 14

Can you explain what exactly the question is about?

Samuel Tan • 4 months ago

I think the question is to first filter out all the words that exceed 5 letters, then sum up the lengths of all such words.
In your above case, only the following names exceed 5 letters:
orange (length: 6)
watermelon (length: 10)
melonbar (length: 8)
monkeybar (length: 9)
So the final result will be: 6 + 10 + 8 + 9 = 33
This is a solution:
return Arrays.stream(names).filter(s -> s.length() > 5).mapToInt(s -> s.length()).sum();

Anonymous • 2 years ago

Très très intéressant comme entrainement .merci