Palindrome Linked List

00:00
EasyLinked ListTwo PointersFast & Slow
Amazon

Determine if a linked list is a palindrome in O(n) time O(1) space.

Examples

Input → 1
Output → 2→2→1 → True
Input → 1
Output → 2 → False
Input → 1
Output → 2→3→2→1 → True