Ahh now I get it. The towers are blocking it against their neighbours. I understood something like they are water towers of a given capacity or such things. Boing. Yea, makes sense now. Thank you!
Yea these edge cases of empty arrays came a little surprising. Not sure if I missed that in the description but it was a bit annoying.
Still, thanks for the task!
Ahh now I get it. The towers are blocking it against their neighbours. I understood something like they are water towers of a given capacity or such things. Boing. Yea, makes sense now. Thank you!
Am I the only one who doesn't understand what to do?
How do I calculate this? (No code needed, I just don't get what do to)
Uh, these special edge cases were killing it for me.
Still thanks for the training!
Yea these edge cases of empty arrays came a little surprising. Not sure if I missed that in the description but it was a bit annoying.
Still, thanks for the task!
String concatenation is pretty slow (since Strings are immutable). For a bigger task use a StringBuilder or StringBuffer instead.
instead of 1..number-1 you can use 1 until number. The until excludes the end. Might make code more readable!