Hey! I think I'm stucked here.
My solution seems to pass all the tests and I've already optimized the prime verification and used memoization for finding all the possible values. Is there some trick or some specific approach?
My solution is passing the Basic tests with completion time near ~5017ms.
good stuff, keeping the run time lower :)
I'm not here to complain and I really liked the Kata but I have some opinions about it and why I think it can be improved (and how to do it).
My suggestion is: I hardly recommed to maintain the range of numbers as
1 <= n <= 50
1 <= k <= 30
Why you are testing values higher than MAX_SAFE_INTEGER in JS? This make no sense at all in this Kata as 7 kyu... Numbers above that are not precise and the values exceeds the time of execution or do not pass the tests.
If possible, can you make the test with numbers below MAX_SAFE_INTEGER in JS?
As a suggestion, I hardly recommed to maintain the range of numbers as:
At least for JS. JS do not have full memory to store numbers like Python and if n exceeds 60, it easily surpass MAX_SAFE_INTEGER.
This comment is hidden because it contains spoiler information about the solution
Hey! I think this kata has some issues in JS version. Most part of it is result of trying to subscribe() the same function more than once and the TESTS(at attempt) are considering this valid as the description says this is not valid.
Here: "each handler will be subscribed at most once at any given moment of time. It can still be unsubscribed and then subscribed again" at Instructions says that this is not possible but the 'attempt' tests are doing this.
If possible, consider correcting this :)
For me, I done the correct solution but takes too much time to reach a solution for the large numbers... /sad
I'll let this one for later and keep coding another katas!