Examlex

Solved

A Method Is Coded as Follows

question 100

Essay

A method is coded as follows:
public static int foo( int n )
{
if ( n < 0 )
return 0;
else
return ( 2 * foo( n - 10 ) );
}
What is the running time of this method? Show your work.


Definitions:

Related Questions