BETA
Optimize following method :

int one=0, zero=0;

void reco(int n)

{

    if (n<=0) zero++;

    if (n==1) one++;

    else

    {

        reco(n-1);

        reco(n-2);

        reco(n-3);

    }

}

Login to Answer
Sort By:
Oldest
|
Newest
|
Vote
|
My Answer