For this Question: You are given head which is a reference node to a doubly- linked list of characters. Complete the function <b> isPalin</b> which returns true if the doubly linked list of characters is palindrome otherwise return false.User task:
Since this will be a functional problem, you don't have to take input. You just have to complete the function <b> isPalin</b> that takes the head of the linked list as parameter.

Constraints:
0 <= Number of nodes <= 10^5.Return true if the doubly linked list of characters is palindrome otherwise return false.Sample Input 1:-
6
098890

Sample Output 1:-
YES

Explanation
It's a palindrome as the first character is equal to last character and 2nd character is equal to second last character and so on.


Sample Input 2:-
2
10

Sample Output 2:-
NO

Explanation:
"10" is not a palindrome, I have written this Solution Code: a=int(input())
b=input()
if(b==b[::-1]):
    print("YES")
else:
    print("NO"), In this Programming Language: Python, Now tell me if this Code is compilable or not?