BearingPoint interview question

Live coding exercise in which the constraint was to implement it recursively