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
This is a very neat recursive solution. However, it's unneccessary complexity to use recursion.
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).
This solution is O(n x m), where n is the number of values to be calculated and m is the seed size. There is no need for the m term; the solution can be completely O(n). The initial Arrays.copyOf() is more clever than what I did.
Admirably terse, with no text for whether or not n is less than or equal to the seed size.
I tagged this as "best practices" because of the simplicity compared to other solutions. It is, however, order of m*n, where n is the sequence length and m is the seed length. order of n is possible, although not important where m is a constant.
Lovely. I couldn't figure out how to use streams since I was thinking of doing the map on the value of the character. Doing the map on the index instead solves that issue. Very clever.
Thanks. One thing that may color my outlook is that I learned programming back in the 1960s. Computer time was massively expensive. Programmer time was relatively cheap. Efficiency was paramount.
This comment is hidden because it contains spoiler information about the solution
This looks like a Python or Javascript solution written in Java.
Truly neat functional programming, but it's inefficient and it's not really Java.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution