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.
I recall I had major difficulties with testing when I created this. I had more exhaustive test cases initially but they didn't work on codewars due to actual issues with codewars' testing framework (this was more than a year ago—maybe it's been improved since). If you want to improve this feel free, I just don't have the time to work on it.
I have not been active and would welcome someone else take over this if it is deemed useful. I just don't have the time.
I believe I've fixed this now.
I hadn't realized that. I put the tests and solutions data into the example test case section, so now it should be OK, I think. Exposing the data like that seems like it's not ideal (I would prefer a way to load test/solution data for testing purposes without exposing it to users, but apparently there's no way to do that.)
I'm not sure what you mean? Can you provide an example?
I haven't had time recently to be active with Kata, but I think the JS translation is fine, and I'd be happy if someone else added more test cases to the Python version.
I'm not sure why
short_tests
andshort_results
would not be defined for you. I defined them both in the preloaded section of the Kata, which you don't have access to, but which is run before the example test cases. It's possible that CodeWars has a bug in their back end that isn't running the preloaded code before running your tests.Maybe easy for you, but not for everyone.
That's a fair point. The way the problem was originally posed to me, you would really be looking through a dictionary of English words, of which there are no instances of multiple vowel alternations across a set of words. To generalize this type of search problem to other natural languages, or non-natural inpu, one could arbitrarily define what the correct "solution" should be.
This comment is hidden because it contains spoiler information about the solution
Yes, the order does matter, since the tests cases are testing equality of lists of lists. If you sort each solution list it should pass the provided test cases.
This is effectively using set-wise comparison. I can alter the test cases to use set-wise comparison, but the description clearly states that you should be returning a list of lists (not a list of set objects). If you sort each of your solution sets, e.g., [sorted(s) for s in solutions], the tests should pass.
It might be preferable to create a test suite that does set-wise comparison, but since Python's built-in list and set types are not hashable, I'm actually not sure how to easily write such tests.
Edit: I made an update to the description specifying exactly how the solutions should be ordered.
My solution passes the provided test case, but when I submit, I get an 'Unknown error'. Anyone else experienced this?