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.
Once I figured out a key concept, how and when to use
Str
andAdd
, I managed to pass it in C# without much trouble.The fact the description mentions "Exp", though in some occasions more specifically requires "Str" doesn't help :s
However, the "core" example test shows how to use these classes. Let's say you have "abcd" (a sequence of 4 x normal). This should be treated as a fold of Add with the seed being the first list item wrapped with Str:
Add(Add(Add(Str(a),b),c),d)
.Good kata!
Still, I'd prefer to see example with -x and big numbers in initial unit tests.
For example:
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
sorting is O(n * LOG(n))
Sorting the list just to find the element is doing O(Log(n)) complexity task where O(n) task is totally enough.