Solutions for Multiplicative Persistence
View the challenge

This challenge requires you to continually multiply all the numbers in the parameter until you reach a single number. For example, if the input is 39, then you multiply 3 * 9 = 27. You then do the same for 27, 2 * 7 = 14, and then finally 1 * 4 = 4. When you reach a single number your program should return how many times you had to add to reach it. For 39, your program should return 3. We'll solve this problem by recursively multiplying the numbers in the input.

You need to be a member to see the rest of this solution and code.