help to find complexity

Revision en2, by Agassaa, 2015-11-10 02:06:26

Hi,

I am a beginner, please help me find the complexity of the following code:

int lim=9;
int vis[200];
void rec(int x) 
{
    if(x==100) return;
    if(vis[x]==1) return;
    vis[x]=1;
    for(int i=x;i<100;i++)
    {
        if(i-x > lim) break;
        rec(i+1);
    }
}
int main()
{
    rec(0);
}

Thanks!

Tags math, combinatorics, thanks

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en3 English Agassaa 2015-11-10 11:30:26 374
en2 English Agassaa 2015-11-10 02:06:26 9
en1 English Agassaa 2015-11-10 02:05:25 377 Initial revision (published)