Skip to content
C

Check Linked List Palindrome

Easyjavapythonccppjavascript

Determine whether the values in a singly linked list form a palindrome.

Input Format

The first line contains an integer N. The second line contains N space-separated integers.

Output Format

Print 1 if the list is a palindrome, otherwise print 0.

Input (stdin)

Output

Run your code to see output here...