i read ur tutorial for 1st problem…didn"t budge anything
…
PS:2nd part will be posted soon, maybe within an hour Sorry for delay.
Second part May also include POLY as delay gift. 
Thanks for sharing… I had said, there are many strings that may work. I found the one mentioned above. 
Like everytime , Nice work!
Thanks Mate!
Waiting for second part and delay gift:)
Glad u found them helpful. 
Polygon pl0x <3
Not sure. I haven’t solved the problem myself…
Asking someone to explain it to me. (while giving credit)
Though i would try my best to convince that person.
I have a doubt @taran_1407
I use the codeblocks ide
whenever i use this code snippet
ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
Output is printed after I Give all the Inputs(if there are 4 testcases after i give all tc inputs o/p is printed)
But when i don’t use it Output is Printed after i give the each t.c i/p
Can you tell me why this happens ??
I think you should google this out. That will be better than anything I can explain 
Ok Bro and keep up your Good work
There are total of 8-10 such patterns which do it. Though half are asymmetric reflections of each other.
I too wrote a brute force algotihm which tested all substrings of length N in 2^N time (bitmask dp, 0 for ‘a’, 1 for ‘b’) and tested upto 24 using manacher’s algorithm for palindrome string length)
After {2}^{N} thing in complexity, I didnt care for anything else and just wrote a O({N}^{2}) code snippet for palindrome detection.
It was still slow af…(13sec for length of 26) XD
@sagijagadish when you write cin.tie(NULL) at the beginning of the code, compiler doesn’t clear the output buffer every time it prints something. Whatever you try to print is stored in the output buffer and printed only once, when the execution of code is finished.
Bonus : Try using endl instead of ‘\n’ in your code. ‘endl’ clears the buffer and add new line at the end.
Nice way. I had said there are many solution to this problem.