Given a linked list of strings having n nodes check to see whether the combined string formed is palindrome or not.
You have to complete the method which takes one argument: the head of the linked list . You should not read any input from stdin/console.. There are multiple test cases. For each test case, this method will be called individually.
Your function should return True if the combined string is pallindrome else it should return False.
The task is to complete the function compute() which returns true or false.
1 <=T<= 103
1 <=n<= 103
a bc d dcb a
a bc d ba
case 1 : as String "abcddcba" is palindrome the function should return true
case 2 : as String "abcdba" is not palindrome the function should return false
If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.