C3 AI Interview Question

I was presented with a recursive programming question.