1

I'm not sure if I'm getting the correct time complexity, any guidance will be appreciated.

int count =0;
for (i=0;i<=n;i++)
{ 
    for (int j=1;j<=i;j++)
    {
         count ++
    }
}

Im working out logn, not sure if my maths is off.

Maroun
  • 94,125
  • 30
  • 188
  • 241
WWBM
  • 25
  • 7

0 Answers0