Company: Sanofi_15nov
Difficulty: medium
Palindrome Linked List Words Problem Description You are given N words. Each word arrives as a doubly linked list of character nodes, which is written on its own line as the characters of the word separated by single spaces - so the word racecar is written r a c e c a r . For each word decide whether it is a palindrome, that is whether the characters read the same from the front and from the back, and print true or false accordingly. Comparison is case sensitive : A and a are different characters, so A b b a is not a palindrome. Implement is_palindrome(line) , which receives one such line and returns whether the word it spells is a palindrome. Input Format The first line contains the integer N , the number of words. Each of the next N lines holds one word, written as its characters separated by single spaces. Output Format Print N lines. Line i is true when the i -th word is a palindrome and false otherwise. Print nothing else. Constraints 1 <= N <= 1000 Each word consists of Eng