I was trying to solve problem from SRM 698. I can't think of any approach for this problem. Firstly I thought, lets iterate through 0 to n .. and see if I delete i character from string will I get S = T + T ..but after some time I realised it's difficult to keep track which characters to be deleted and so on.. Recently in Educational Round at Codeforces I got another problem.. I keep getting these types of problems all the time but never solved them . How do I develope an approach for all these types of problems and problems where they delete, insert and do all kind of operations like this problem.. Also I could not find editorials for that match.. if you find please share the link ..
About topcoder problem:
Think about classical dp algorithms!
Break the string S into two parts, there are n - 1 such pairs and then find the longest common subsequence of them. Overall complexity is O(n3).