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.
Thanks for the help. I will annotate it for future katas.
In my test fixture I added a function on the Array prototype to shuffle the elements in an array. The for(..in..) loop you're using is trying to add that function to your solution variable, causing it to be NaN. I can't modify the test fixture anymore, so you'll have to modify your code. Switching the for(..in..) to a for(var i=0; i<aux.length; i++){..} should do the trick
Can you post a code snippet and mark it as a spoiler?
When I clicked in "Save & Attempt" i got the following output:
Test Failed: Expected: abcdefhijklmoprtvwxy, instead got: abcdefhijklmoprtvwxyfunction (){ var copy = [].concat(this); var ran1, ran2, tmp; for(var i=0; i
And that is not in my code.
haha yes, that could be a constraint
Sure, and one such constraint is to make a solution in as few bytes as possible :-)
Of course, I agree with you that it's all your choice. I just wanted to say that I don't enjoy solving this kata in less than 1 minute without learning anything at all (luckily a method from the string api) and to create your own constraints is a way to make it more interesting.
I find it very hard not to use features of the particular programming language. Clearly, that is the whole point of having different programming languages. Take JavaScript you can 'exploit' the default functions/methods - or you can build your solution using lambda calculus only (disregarding the language features of functions being first class citizens). It's all your choice. However, translating the top-most solution into native C using no libraries shouldn't be too hard as the procedure to solve the kata will most likely go in the same direction.
I just don't understand why most of solutions are based on language specific properties. I understand katas as a way to improve the programming knowledge, this kata is awesome to practice any the famous sorting algorithms.