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.
This comment is hidden because it contains spoiler information about the solution
Which language? And feel free to share your code with a spoiler tag here :)
This comment is hidden because it contains spoiler information about the solution
If I read the solution code in the test cases correctly, it's O(m x n), where m is the seed length and n is the number of values to be generated. IMHO, this is a sub-optimal solution. It can be implemented in O(n).
Why was double used as opposed to long? My solution is valid in my opinion, but because jitter can creep into a floating point number over multiple operations, sometimes it fails the random test.
There are plenty of examples that have different count of numbers, but thanks for the suggestion.
I suggest modifying the second given example to be more different in the appearance count from the first example to cut down on the chance the reader leaves with the idea that the character string is only valid if every character appears twice.
Example modification:
"abcabcab" is NOT a valid word because 'a' appears thrice, 'b' appears thrice, but 'c' only appears twice!
Because C89