• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests
October 28, 2023 |1.4K Views
PROBLEM OF THE DAY: 27/10/2023 | Minimum Deletions
Description
Discussion

Welcome to the daily solving of our PROBLEM OF THE DAY with Karan Mashru. We will discuss the entire problem step-by-step and work towards developing an optimized solution. This will not only help you brush up on your concepts of Dynamic Programming but will also help you build up problem-solving skills.

In this problem, we are given, a string of S as input. Your task is to write a program to delete the minimum number of characters from the string so that the resultant string is a palindrome.
Note: The order of characters in the string should be maintained.

Example :

Input: 
S = "aebcbda"
Output: 
2

Explanation: 
Remove characters 'e' and 'd

Give the problem a try before going through the video. All the best!!!
Problem Link: https://practice.geeksforgeeks.org/problems/minimum-deletitions1648/1
Solution IDE Link: https://ide.geeksforgeeks.org/online-cpp-compiler/b1eccbc6-048c-4025-a9f1-523efe094172