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.
Cool
Wow. It's cool
Nothing. Regular string concatenation faster that String#format. You can find in google performance of regular concatenation and String#format.
In case when sum of all numbers < k your code will be execute infinity
bad performance
Yes, it short solution, but performance of String#format is very bad.
I'm sorry.
Thank you.
This comment is hidden because it contains spoiler information about the solution
O.o
Short but not effective
Yes, your solution is shorter. But I think that we (developers) should write faster code. Imagine that your method will execute 1_000_000 times in production every 1 minute. It will be slow.
Also I think that this kata we can't solve with regex, because we have several replace templates.
Sorry for bad English.
This will create 5 new String instances. Also this solution will make 5 loops for replace all characters.
This comment is hidden because it contains spoiler information about the solution
Bad. Very low performance. You call #generateMap twice in #variance. Also you sum Double wrapper objects. It call many box and unbox operation, this operations is slow.
And this can throw NPE if we pass null as name or null as password
Loading more items...