title: Space complexity of recursive algorithm
body: <p>I was asked at an interview, the efficient way to solve a problem checking for pallindrome. </p>
  
  <p>Now i can do two things:</p>
  
  <ol>
  <li>starting from i = 0 to i = n/2 and comparing ith and n-ith character to be equal.</li>
  <li>I can use recursion to check if first and last are same and the rest of the string is a pallindrome.</li>
  </ol>
  
  <p>The second is recursive. My question is what is the difference in the space complexity of an algorithm's recursive and non-recursive versions?</p>