Design an algorithm which takes an input string and return a

Design an algorithm which takes an input string and return a palindrome by inserting the smallest number of letters. You are allowed to insert characters at any position of the string. For example, AAT can be turned into palindrome TAAT by one insertion T, and GCT into GCTCG with two insertions CG. Besides designing an algorithm you also need to provide the time complexity analysis (e.g. big–‐O notation).