CSC235 Data Structures - Recursion Worksheet
Given the following recursive function:
int GCD(int A, int B)
{
if (A % B == 0)
return B;
else
return GCD(B, A % B);
}
- Trace the following call to GCD, and tell what
is returned:
GCD(385,120);
- What happens if B > A?
Email Me |
Office Hours |
My Home Page |
Department Home |
MCC Home Page