title: Check if a linkedlist is palindrome (Recursively)
body: <p>I am trying with the below code, but the result is always <code>true</code>;</p>
  
  <pre><code>public boolean isPallindrome(Link link, Link right) {
      if (right == null)
          return true;
  
      if (!isPallindrome(link, right.getNext())) {
          return false;
      }
      boolean isP1 = right.getData() == link.getData();
      link = link.getNext();
      return isP1;
  }
  </code></pre>
  
  <p>Calling: - </p>
  
  <pre><code>System.out.println(link1.isPallindrome(link1.getFirst(), link1.getFirst()));
  </code></pre>
  
  <p>I think the culprit is the return from where <code>right</code> is checked against <code>null</code>. It is one which might be returning <code>true</code> always. Can some one suggest how to fix this.</p>