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.
i cleaned up the Java tests suite and enabled JUnit 5. I kept the
testing()
function because it leads to much shorter lines thanassertEquals(Accumul.accum(...
and it allows presenting the input in an assertion message.fixed + upgrade to JUnit 5 + the initial code now compiles + better assertion messages + the tests suite no longer logs to stdout
you under-allocate. your formula is wrong:
for
"abc"
,n = 3
, the result string requires"A-Bb-Ccc"
=9
bytes, but your formula allocates3 / 2 * (3 - 3) + 1
=1
byteOh dear, I remember those!
Merged!
C:
fork fixing it (author inactive)
also massively simplifying the tests suite (removal of 200+ lines of preloaded code, among other things)
Fixed.
Im new to this but just noticed theres a tiny issue (not a critical problem at all) where in
public class Accumul
{
public static string Accum(string s)
{
return ""; // your code
}
}
The public static string is written as "String" causing an error.
best one IMO