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.
Resolved since this question is explained above and OP solved this kata
It requires a higher Node's version.
I think the main issue is your recusion. As far as I can see the call stack size is exceeded after more than 6000 calls to
factors
for the inputprimeFactors(933555431)
.Why not just rewrite the function as a loop?
I've not encounteted failed random tests with your solution.
OMG you are a life saver
This comment is hidden because it contains spoiler information about the solution
You should return which player won, not which item the winning player selected. Player 1 is the first argument and Player 2 is the second argument
^ That