- May take the form of circular call relationship
- Determine what the base cases are.
- Example of when you might see recursion:
- Divide and conquer algorithms
- Sorting
- Tree or graph traversal, such as directory or file search
{
int result; // eax@4
int v2; // [esp+0h] [ebp-Ch]@1
int v3; // [esp+8h] [ebp-4h]@1 v2 v2 = sscanf(Src, aD, &v3); if (
if ( v2 != 1 || v3 < 1 )
BombBlowupFunc(v2);
result = fibonacci(v3); if (
if ( result != 55 )
BombBlowupFunc(1); return
return result; }
{
int v2; // esi@3
if ( a1 <= 1 )
return 1;
v2 = fibonacci(a1 – 1);
return v2 + fibonacci(a1 – 2);
}