sekiro_73's blog

By sekiro_73, history, 13 months ago, In English

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.

 
 
 
 
  • Vote: I like it
  • +1
  • Vote: I do not like it

»
13 months ago, # |
  Vote: I like it +5 Vote: I do not like it

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.

»
13 months ago, # |
Rev. 2   Vote: I like it +5 Vote: I do not like it
hint to solve palindrome queries
»
7 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Hello, I tried hashing and the segmentTree approach for the same, but I can't seem to find the mistake I made. Any kind of help is appreciated.

https://pastebin.com/eYhy3mr1