Question 67

What is the time complexity for the following C module? Assume that n > 0;
int module(int n)
{
if( n == 1)
return 1;
else
return (n + module(n-1));
}


Create a FREE account and get:

  • Download Maths Shortcuts PDF
  • Get 300+ previous papers with solutions PDF
  • 500+ Online Tests for Free

cracku

Boost your Prep!

Download App