please tell the error
You have to count the frequency of each element from start upto the middle element and from middle element to the end , if its length is odd you will have to skip the middle element , but in your code you are just reversing the string and compairing whether both the string are correct or not, which is wrong