Living on a Prayer

Tommy is an unlucky guy who used to work on the docks. He and his wife Gina are not financially stable, so life is very tough for them. And since there is a strike that has made the docks become closed, Tommy has no work to do and has started spending more time at home. Gina tries to keep Tommy busy at home so that Tommy doesn’t feel upset. For that purpose, each day, Gina gives Tommy a string S and asks him to find the K-th palindromic sub-string of that string.


This is a companion discussion topic for the original entry at https://toph.co/p/living-on-a-prayer