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.
From the description:
All your generated random tests consist of only one chain.
In the Discourse of the Kata doesn't take into consideration this problem if you could specify a bit more.
Thank you for taking the time to check the translation, I have made the changes you suggested.
Random tests do not create test cases with separate words but only encoded spaces.
'\0'
is still relevant.new Random()
in every loop iteration in every of 100 testcases is unnecessary. The tests could use aThreadLocalRandom
instead, or aRandom
instance field of the test class.Random
already has thenextInt(lo, hi)
, andRandom().nextInt(256 - 32) + 32)
is unnecessarily complex. You could also avoid magic numbers by sampling characters from an alphabet string.string.toString()
twice is unnecessary.You can check the collection of the example kata for some ideas.
Java translation