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.
I don't think modular arithmetics is basic math, but I guess that is a matter of perceptioin.
That kata now already has a Java translation. Also this kata requires to merge the frequency count and prime factors in string format, so technically not an exact duplicate.
Also, duplicates of Prime Factorization katas has been mentioned here and will be handled sooner or later.
Corrected!
Thanks for the feedback!
Still a single for loop code is more readable and more efficient than the top voted solution
Done. I changed amount of tests to 25 each. This differs now to other languages, I hope that is okay, else will put 50 again...
java
To which language does this remark refer? I guess it's python?!
Edith: no it's java... reading junit docs...
This comment is hidden because it contains spoiler information about the solution
sometimes readability is over the performance, probably why my solution is on the top
Exactly what I thought. This is solvable with just two single loops. Summing up the arr twice with each comparison is just horrible on the performance side.
Also this would be duplicate of https://www.codewars.com/kata/5899642f6e1b25935d000161 and https://www.codewars.com/kata/52336a4436e0b095d8000093
I still don't see any reason to provide sorted iterators, if we can pass this kata ignoring the fact they are sorted.
Yes, the variant with a cycle - more optimum. but when you solve the same problem, sometimes you want to implement it differently.
Clearing up old issues
This comment is hidden because it contains spoiler information about the solution
Loading more items...