Closed caiangums closed 6 years ago
Create two reverse for-loops from the last number (999) and decreasing. The second for-loop decrease just 100 numbers based on the first one.
999
100
There is a reverse number check function too, created with no strings conversions.
reverse number check
Try it online!
Real time: 0.331 s User time: 0.259 s Sys. time: 0.068 s CPU share: 99.04 %
Nice one! 👍
How the solution works
Create two reverse for-loops from the last number (
999
) and decreasing. The second for-loop decrease just100
numbers based on the first one.There is a
reverse number check
function too, created with no strings conversions.Performance
Try it online!