Why does this recursion work for this problem?

Printable View