Testing a Challenge not working

This is the second time it happens, (the first time, I gave up the day it was doing and next morning ran the test and it worked)
I got the my code ran on sublime text, I tested and gave me the results expected.
I copy and pasted to the freecodecamp page and the last test (which is the one that needs more iteractions) fails to do so,
It produce different answers every time I ran the test…
I got stuck with this challenge for the last three days,
Does anyone know whats going on?

To protect campers from freezing their browsers with infinite loops or infinite recursion, Free Code Camp will cancel function exectution if it runs for too long. If a solution is inefficient, it can end up running slowly enough that it triggers this infinite loop protection before it completes.

Thanks Ariel for replying so fast!
And yes, I understand. I got the feeling that it was by design to stop infinite loops.
However, I like using sublime text to code (as I use it and get more and more familiar with it) and the code will produce the right answer. so, what should I do? I can’t think how to refactor the code to make it faster or less iteractions.
Any suggestions wuould be great!
Thanks again Ariel

If you share your formatted code (rather than a screenshot) and ask for help making your code more efficient, you’ll probably get some advice from your fellow campers here on the forum.

1 Like