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.
Suggesting back at you: read the description. Closing.
The instructions say an array of numbers from 1 to 10 will be passed in. However, arrays of various sizes are passed in. In most cases the algorithms will work anyway but if they are being thorough and check that all the numbers from one to 10 exist they will get errors and be penalized for doing a more thorough job.
@alfe I agree that understanding recursion is important and there may be times when it is the best solution. However, it is more important to know when to use it or when not to use it. In this kata what would be the advantage recursion? In this example the recursive solution I was able to find was far more complex then the simplest iterative solutions which didn't rely on any fancy library functions.
While I think that the use of eval() is clever I definitely don't feel it warrents a best practice rating since eval should only be used as a last resort and in carefully controlled situations where nothing else is possible.
This comment is hidden because it contains spoiler information about the solution
Thanks for the heads up on the description.
Just a quick heads up on a grammer issue.
In your paragraph describing the difference between this and the basic Vigenère Cipher you have some repeated text:
With the basic Vigenère Cipher, we assume the key is repeated for the length of the text, character by character. In this kata, the key is only used once, and then replaced by the decoded text. Unlike the Vigenère Cipher Helper kata,
Unlike the Vigenère Cipher Helper kata,the key index is only incremented if the current letter is in the provided alphabet.I did your basic Vigenère Cipher and really liked it. I ran out of time to do this one today but I am marking it to do tomorrow :)
I think this was a great kata as far as the concept goes. I did notice there has been some confusion and when I first looked at it I was a bit confused. The biggest source of confusion for me was the name of the function.
It appears that I look at the function name first before reading the description. When I read largestDifference I immediately jumped to the conclusion that I needed to go through the array and find the numbers with the biggest difference and then when I read the description I felt lost the first time through. Then I re-read the title and realized I totally was on the wrong track and then everything made sense.
Maybe for others it isn't a big deal but I think a different function name would make it easier for others. Maybe just camelCase the title or some arrangement of it, though it would be awfully long I think it would be better then the incomplete function name it has now.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution