Given a singly linked list of Integers, determine it is a palindrome or not.
Input Format
1->2->3->4->3->2->1->null 1->2->3->4->2->1->null
Output Format
true false
Constraints
0 <= N <= 10^6
Notice
Try First, Check Solution later
1. You should first read the question and watch the question video.2. Think of a solution approach, then try and submit the question on editor tab.3. We strongly advise you to watch the solution video for prescribed approach.Example
Input
10 5 1 4 6 9 9 6 4 1 5
Output
true