ISRO Scientist or Engineer Computer Science 2014 Question 67

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

Comments

Register with

OR
cracku

Boost your Prep!

Download App