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
  • 91,013
  • 29
  • 181
  • 233
WWBM
  • 25
  • 6

0 Answers0