Ad
  • Custom User Avatar

    There are no permanent test cases that test empty groups of zeroes. One of my iterations of code would print "thousand" even though it should not have been printed. I recommend adding a test like this:
    Test.expect(intToEnglish(3000000000000) == 'three trillion', "'three trillion' expected")

    All included tests would pass and i ended up catching the bug with the randomly generated tests. My code would print "three trillion thousand".

  • Custom User Avatar

    You're right it works fine.

  • Custom User Avatar

    I'm using javascript.

  • Custom User Avatar

    My code passes tons of tests, including all those left below but when I submit my code I get the error:
    "Process was terminated. It took longer than 6000ms to complete"
    Can I not use recursion to solve this problem? Is it too computationally complex?

    I am also getting a lot of "submission timed out" errors.

  • Custom User Avatar

    I would suggest using L(-n) = L(n)(-1)^n