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.
Fixed
Description is incorrect as it specify different output expecte dthan the tests. Also it does not count for random numbers.
Thanks Brian. Yes, that is correct, that was my intention. I'm not even sure I can call that a "performance" test. It doesn't actually test performance per se.
That's true. However, I don't fine comb a translation to see if it is an EXACT duplicate of the one I made. Will remember going forward to make sure translations test the same things.
"The js tests are harder"
That shouldn't happen. Either all the languages should have a performance aspect, or none of the languages should have a performance aspect. They have to be equivalent difficulty.
I added memoization without luck, so instead I just generated all the possible search strings.
The js tests are harder because there is a performance element to it.
Regex
has got nothing to do with the solution timing out. It has to do with the way you store the words in your dictionary structure. Let's say you don't have a word in the dictionary and I query to find that word thousands of times. That is what's happening here.I went from a regex solution to a non-regex solution, and it still takes too long in Javascript.
In contrast, in python I finished first try (non-regex).
Is it possible there's an infinite loop in the JS tests or something? Or do we need to algorithm harder?
Doing this kata in javascript and same situation. Regex based search passes all test but process is terminated 6000s....
Hi,
I got the solution passing all initial test bu tit fails on time when runnin random tests > 6000ms. Any ideas? i an using a regexp based search...
Thanks for reply, is seems so as I have encountered seveal other ES6 features not really accepted :)..well let's get back to the classics then.
I've noticed there are a few functions that don't work yet. My guess would be that the Babel version isn't up to date, and the older version doesn't support all the shiny new things.
Second function instruction could be more clear. Understanding the requirement of the order in which the result is expected is not immediatly obvious.
Any idea way the Array.prototype.fill() from ES6 does not work. In the instruction it sais that ES6 is supported...via Babel. I got the solution working on JSBin but when runnign the tests here I got an error ...