Pregunta de entrevista de Google

Algorithm questions around recursion and iterating o them