Ad
  • Custom User Avatar
  • Custom User Avatar

    ran into the same problem, you'll have to find another way to run this in less iterations! Not sure what your solution is, I know the easy way out is checking to see if the number N modulo'd by 2...3...4...N-2...N-1, but this takes way too many iterations with large numbers.

    Another scenario you might be running into (which I ran into) was keeping an array of prime numbers within the bounds, this also gets really large and requires a large amount of iterations, try not using an array of prime numbers if yo uare doing so.

  • Custom User Avatar

    The whole point of the kata is to parse input from a "dumb" user, so cases are meant to be confusing - edge cases are meant to be messed up. And while I might agree with some of your observation, as far as I know and have seen here in the UK, you almost always prepend "£" to the amount, never seen it put inside it with a following "p", so that in my book should be wrong.

    For the rest, I will make clearer that "£" wins over "p".

    Thanks for your feed :)

  • Custom User Avatar

    Thanks for the feed; if you want to suggest some edit to the description, just be my guest :)

  • Custom User Avatar

    That means your solution has either entered an infinite loop or it's inefficient to handle the supplied data, if you post your solution and mark it as a spoiler people can help debug your code :)

  • Custom User Avatar

    No problems with the tests. Did you make the distinction between "gap" in primes and "step" in primes? To see the difference look at: http://www.codewars.com/kata/5613d06cee1e7da6d5000055. Maybe you could begin with "Steps in Primes" kata. Hope that helps!