Add recursive solution.