Calculate x to the power of y using recursion.
def test(x, y)
if (y == 0)
test(x, y-1) * x
This was a interesting question during the interview. I never understood recursion. The interviewer skillfully provided some clues for me to figure this one out myself. I wrote down some sample values for x and y in a tabular format. Worked through the problem and surprisingly come up with the right answer!