Ad
  • Custom User Avatar

    Fixed

  • Custom User Avatar

    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.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    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.

  • Custom User Avatar

    "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.

  • Custom User Avatar

    I added memoization without luck, so instead I just generated all the possible search strings.

  • Custom User Avatar

    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.

  • Custom User Avatar

    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?

  • Custom User Avatar

    Doing this kata in javascript and same situation. Regex based search passes all test but process is terminated 6000s....

  • Custom User Avatar

    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.