Hi Renan Couto , great job explaining the recursive solution. I personally find the iterative solution for this problem quite intuitive during the interview, and that is why I went forward with it. However, recursive solution also has the same time complexity, as you mentioned it is O(n) . And yes, thank you for appreciating the post :)
