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.
No random tests.
The use of regex is not restricted.
Yep, spent an hour on this until I realized that the test was broken. The test is written for pre-order traversal, not level order traversal.
Good point, added to description.
Missing clojure example within description
Wow, very nice. Simple and clever.
Good point, changed function name to mergedsorted.
The description refers to a function called
mergedsorted
. Either the description or the code should be changed so that they match.had to unpublish, save, then re-publish. the provided tests should be working properly now.
Sorry, I've been trying to update that all day, but every time I try to "re-publish" the kata with the corrected test cases, it never finishes, just sitting at about 99% for as long as I'm willing to let it go.
I am working on getting that fixed.
The provieded tests gave me EOF errors.
I think the ratio/float thing is trivial enough. The point of the kata is to return a float that indicates how similar two vectors are. In practical application, if a ratio were needed, it wouldn't be an issue to remove the float conversion.
If you wanted to allow it (and I don't think it's a big deal either way), you could convert to float in the test which would allow either floats or ratios.
Seems fair enough. As long as it's clear what is required, and I'd agree that the tests do that now.
mtthw123, after typing that bit a few times, and feeling like it was giving too much away, I ended up adding a couple more example test cases, one in which the vectors were not same-length, then mention that it holds a clue to the correct solution (or a correct solution).
(= (vector-affinity [6 6 6 6 6 6] [6]) (float (/ 1 6))
Just since here obviously the second vector is shorter, and the equality to (float (/ 1 6)) illustrates that the larger of the two is used as the denominator.
What are you thoughts on that?
Loading more items...