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.
The Fraction function is not always returning a fully simplified fraction. For example, Fraction(262125, 131072) should simplify to Fraction(2, 1) because the value is very close to 2. Is there a way to round 262125 / 131072 to 2/1, since it's nearly equal? I do have a criterion in my code that stops the loop at a certain point(10**10).
what should I study to be able to solve this problem??
This problem looks quite hard but I would really like to solve it,
Would someone give me any hint about the problem?
I searched some ways on how to solve problems like this,
but I found that I am not able to implement code that does this stuff,
and that I would need alot of work like this in coding,
so any suggestions?
Any hints?
Bugfixing fork to address cases in which the JS reference solution breaks down:
https://www.codewars.com/kumite/65383e33e681c41613bcb605?sel=65383e33e681c41613bcb605
Details on bugfix here:
https://www.codewars.com/kata/63c05c1aeffe877458a15994/discuss/javascript#6536cc0c49d3ef23dade29b1
Waiting on approval.
Are there any Javascript libraries that could be helpful for this? I haven't worked with JS imports before and have no idea if there are any math based one.
If not, is there a way I can get my code from O(n^2) to O(nlogn)?
Also I'm trying to learn complexity so am I right in that assement above?
How is this substantially different from the usual prime finding when solution like this is trivial to write?
I think this kata needs the Performance tag. The inputs are enormous.
Nice kata. But maybe we should ban numpy, because it makes the problem trivial. Without using numpy it is necessary to implement an algorithm that does not do any extra calculations otherwise you will get a timeout. I had to optimize the calculations several times to get it to work in the end.
https://www.codewars.com/kata/reviews/644aeb00e11b6b00010b54e4/groups/644af2990af0200001559141
From random tests:
No.
More importantly, this task is a duplicate of https://www.codewars.com/kata/5716a4c2794d305f4900156b
Tests expect incorrect answer:
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Loading more items...