BearingPoint Interview Question

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