Write  function to reverse a string. Iterative and recursive solution.