How to find non reducible fractions more efficently(code keeps timing out)
I’m trying to find the non-reducible 0-1 fractions for a number passed as an argument in my function.
I was able to do this but my code keeps timing out for large numbers. Please help