Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
easy to understand, well made
Is using sb.Grow before a loop always going to be more performant than using buffer.WriteString within a loop? I'm not familiar w/ Golang compiler internals nor it's optimizations, but I kind of assume there could less memory allocation ops in your solution, if compiler doesn't translate both versions to the same machine code.
Oh my god what is this!? i might neet to throw this in chatgpt to understand
of course. only change constants.
but the testcases are against that
and this code may be used on other planets
Short-curcuiting is mostly used for defining default values or making decisions. Ternary operator is preferable here since it's just a simple return, furthermore it's just a much clearer code to read... 🤓
my god...
I don't think this null is necessary for this problem.
easy to maintence and reality in development of the game like this
very readable
This comment is hidden because it contains spoiler information about the solution
@davorpa If you read the docs, it shows that has the null check built into it.
if (locale == null) {
throw new NullPointerException();
}
do you know the concept of null-safe methods? null is not same as empty
It's no need to check for empty string, because .toUpperCase contains this condition: https://www.javatpoint.com/java-string-touppercase
why try hard ?
Loading more items...