Minimum Insertion Steps to Make a String Palindrome
Given a string s. In one step you can insert any character at any index of the string.
Return the minimum number of steps to make s palindrome.
A Palindrome String is one that reads the same backward as well as forward.
Example 1
Input
s = "zzazz"Output
0The string "zzazz" is already palindrome we do not need any insertions.
Example 2
Input
s = "mbadm"Output
2String can be "mbdadbm" or "mdbabdm".
Constraints
- 1 <= s.length <= 500
- s consists of lowercase English letters.