How to find number of non reducible fractions of any number more efficiently
I’m trying to input a number as an argument of my function and return the number of 0-1 fractions that can not be reduced at all (code wars problem).
How to find number of non reducible fractions of any number more efficiently in JS
So I’m trying to input a number as an argument of my function and return the number of 0-1 fractions that can not be reduced at all (code wars problem).
I kind of already did it but my code keeps timing out for larger numbers.