I Need Some Help With Time Exceeded | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

I Need Some Help With Time Exceeded

Okay so basically I have this one c++ problem and it is driving me CRAZY. Could I please have some help :3 int lengthOfArray(int num){ int sum = 0; for(int i = num; num > 1; num / 10){ sum++; } return sum; } ^^ The above code returns Time Limit Exceeded, but I why? Some help ples

14th Dec 2017, 3:11 PM
Uzman
Uzman - avatar
1 Answer
+ 1
Thank You!! Cheers mate
14th Dec 2017, 3:49 PM
Uzman
Uzman - avatar