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
Nice recursive solution. I didn't think of this solution. It took me some time to understand what the creator of the Kata meant. The description was kinda vague.
It is a good solution. I would suggest that you do: input.ToLower() .ToCharArray() .ToList() etc. Then you have more readable code. If you look at my solution you see how it can be achieved without using the dictionary. But it is still a good solution :-)
A small hint:
Primes.GetInBound() returns a List now, but since nobody is going to (and should not) modify the list, it you could convert the list to an array and let the function return long[]. That locks down the list against accidental modification.
Nice idea to make IsPrime an extension of long!
Nice collection of gears, nuts and bolts! :)
Thanks. I like your implementation of extension methods. Makes a lot of sense and allows a first-to-last method call notation rather than the last-to-first one I am forced to use.
Your solution looks almost as mine only i would recommend to implement the transformations as extensions :) looks more clean. For the rest good job!
Charming combination of a very readable top level function, cleanly separated responsibilities and a recursion algorithm!
One small improvement could be to make the sequence a distinct sequence, before feeding it in the foreach loop. That way, you wouldn't be trying the same numbers multiple times.
It's a less elegant attempt at what you do with the Hits and BattleOutcomes. Glad to see my implementation does have a context-specific advantage.
Fun idea, to have the powerBalance in there.
Let it emit some events and you can create a GUI on top of it that plays out the battle visually ;-)