Check if the linked list of integers is Palindrome

Given a singly linked list of integers, check if the values of the nodes are symmetrical(Palindrome). Example: 1->23->45->6->45->23->1->null is symmetrical 1->23->4->32->1->null is not symmetrical null is not symmetrical 1->null is symmetrical public class Answer implements PalindromeListInterface { @Override public boolean CheckPalindrome(Node node) { // WRITE YOUR CODE HERE } } // Here is the Node.java public class Node { public int nodeValue; public Node nextNode; }

Answer

1 comment: