Given the head of a singly linked list, return true if it is a palindrome or false otherwise.
Example 1:
Input: 1 2 2 1 Output: true
Example 2:
Input: 1 2 Output: false
Input format: Single line of space-separated integers.
Output format: true or false.