Hello People, I am unable to do this question on CSES: Palindrome Queries I was doing using Binary Index Tree but it failed for 6 / 13 test cases. There was a link about this problem on GFG which could be found here : GFG. Can anyone help me out in this.
Both are two different problems. In CSES you have to tell whether substring from index a to b is palindrome or not and in GFG you have to tell is it possible to make a palindromic string using substring from index a to b.
Use string hashing for this , construct Fenwick tree of hash for string and string reverse.