Pergunta de entrevista da empresa LinkedIn

Write an iterative version of a recursive function. Yes, it sounds basic, and yes it's easy to do for many problems (tree walking, Fibonacci series, etc). This wasn't one of the straightforward cases.