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.
A lot of part of your code is redundant and can be done in O(logN).
You are checking unnecessary values on whether they are being prime.
You need not to pre-generate prime values beforehand
You need not to sort and remove duplicate entries
Remember that you only need information on the shared prime factor numbers between each numbers in the list.
So smart!
Not true, last line would return false.
Your code is efficent. Please note that there is one more condition if n>0 (example: in case parens='((((') return false.
This comment is hidden because it contains spoiler information about the solution
Oh I see the parameter is an array, and I miss understood that the paraments are numbers. Thanks I found the problem with my code.
No, even the number is small it's not checked, my function is not return blank but it regcognise that my function return a blank array. My code is right I wrote an test in VScode. Please check
Sorry your code is wrong somewhere.
BTW before posting issues look at the top of the page to see how many people passed the kata (2732 in JS). When this number is high, high are chances that your code has a problem.
Cheers.
This comment is hidden because it contains spoiler information about the solution