With refactoring, a lot closer; just recursion dir-basing to fix
Two sample interview questions, good for RBC