Skip to content
CampusEduX

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.

Related Problems

  • Create and Traverse a Linked List
    Easy · java, python, c, cpp, javascript
    Solve Problem
  • Insert at Beginning of Linked List
    Easy · java, python, c, cpp, javascript
    Solve Problem
  • Insert at End of Linked List
    Easy · java, python, c, cpp, javascript
    Solve Problem

Input (stdin)

Output

Run your code to see output here...