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.
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.