+ 2

Which one is faster?? Printing numbers say from 1 to 100 in forward order or reverse order using a for loop??

17th Jul 2017, 7:43 AM
Jashua Paul
Jashua Paul - avatar
3 Respostas
+ 2
computers dont know anything about forward or reverse order they just increment or decrement number according to statement so both of them will take equal.
17th Jul 2017, 9:15 AM
shobhit
shobhit - avatar
+ 1
I am not sure but I would think that it should be equal.
17th Jul 2017, 7:48 AM
Oscar Albornoz
Oscar Albornoz - avatar
+ 1
Yes it should be equal, or the difference would be so small that even with an enormous range of number you would not see it
17th Jul 2017, 8:10 AM
Baptiste E. Prunier
Baptiste E. Prunier - avatar