Demonware interview question

Recursion question, replace for loop wuth recursive approach