title: Curious about a piece of code that recursively checks if a link list is palindrome
body: <pre><code>bool isPalindromeUtil(struct node **left, struct  node *right)
  {
     /* stop recursion when right becomes NULL */
     if (right == NULL)
        return true;
  
     /* If sub-list is not palindrome then no need to
         check for current left and right, return false */
     bool isp = isPalindromeUtil(left, right-&gt;next);
     if (isp == false)
        return false;
  
     /* Check values at current left and right */
     bool isp1 = (right-&gt;data == (*left)-&gt;data);
  
     /* Move left to next node */
     *left = (*left)-&gt;next;
  
     return isp1;
  }
  
  // A wrapper over isPalindromeUtil()
  bool isPalindrome(struct node *head)
  {
     isPalindromeUtil(&amp;head, head);
  }
  </code></pre>
  
  <p>look, when the left pointer and right pointer meet at the middle of the list in case when the link list contains odd no. of nodes, can't we terminate the recurrence faster by setting a flag equal to true if the cross- over between left and right pointers has already happened and then if the flag is true, we can directly return true without having to go through all those case checks??</p>
  
  <p>@m ohem , my question was whether we could short circuit the process of returning true when the pointers have crossed over by making them set a global flag to true once the cross-over occurs..this short circuits the recursion without having to use the jmp operation that you suggested</p>