Palindrome List

Given a singly linked list, determine if its a palindrome. Return 1 or 0 denoting if its a palindrome or not, respectively.

Notes:
- Expected solution is linear in time and constant in space.

For example,

List 1-->2-->1 is a palindrome.
List 1-->2-->3 is not a palindrome.
Interview Code Editor
Hints
  • Solution Approach
  • Complete Solution
5753 successful submissions.
Asked In:
  • Amazon
Click here to jump start your coding interview preparation