Need help for palindrome problem

Could you please take a look and let me know what is wrong with my code.

See the constraints, you can’t check whether from L to R ,the string is palidrome or not as it was same as traversing from L to R in main array and see whether the string can be made palidrome or not.
Think of it using Fenwick Tree.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.