sir my solution has outputed 713 while the site gave my error saying it should be 731 for 371, Test.assertEquals(nextBigger(371),731) this line is written as one of the demonstrating examples below, if you take a look at me solution you will see it compares every number ascendingly with the tested number, while this is certainly terible performance it always give the right ans.
thanks it now works fine.
There is no such test in javascript, backup your code, click reset, paste it and try again.
You should see these tests:
sir my solution has outputed 713 while the site gave my error saying it should be 731 for 371, Test.assertEquals(nextBigger(371),731) this line is written as one of the demonstrating examples below, if you take a look at me solution you will see it compares every number ascendingly with the tested number, while this is certainly terible performance it always give the right ans.
This error means that you attempt to read out of bounds of a vector, or a string.
It's a bug in your solution, and not a kata issue.
What does your solution return for
n=9876543210
?This comment is hidden because it contains spoiler information about the solution