Verify Palindrome or Not
Description
Given 2 strings of N length (equal length), when we concatenate these 2 strings check whether the final string so formed is a palindrome or not. Output "yes" if the final string so formed is a palindrome else "no"
Note: String contains lowercase English alphabet
e.g.:
abc
cba
Upon concatenation the final string will be "abccba" , it is a palindrome , so output will be "yes"
Input
Input Format:
First line of input contains the number N , denoting the length of each string
Second line of input contains the string S1
Third line contains another string S2
Constraints:
1<=N<=500
Output
Output "yes" or "no"
Comments
Post a Comment