filmov
tv
Minimum number of deletions to make a string palindrome || Python || Top Down || Dynamic Programming
![preview_player](https://i.ytimg.com/vi/uXS-9InakW8/maxresdefault.jpg)
Показать описание
Given a string of size ‘n’. The task is to remove or delete the minimum number of characters from the string so that the resultant string is a palindrome.
Note: The order of characters should be maintained.
Examples :
Input : aebcbda
Output : 2
Remove characters 'e' and 'd'
Resultant string will be 'abcba'
which is a palindromic string
Note: The order of characters should be maintained.
Examples :
Input : aebcbda
Output : 2
Remove characters 'e' and 'd'
Resultant string will be 'abcba'
which is a palindromic string