Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1
Might also be an infinite loop if you are unlucky and n has its second final bit to one. j will turn to a negative value then to 0 and it will never reach n
2nd Sep 2017, 9:47 AM
Baptiste E. Prunier
Baptiste E. Prunier - avatar