July 07, 2022 |470 Views

Minimum reduce operations to covert a given string into a palindrome

  Share   Like
Description
Discussion

Given a String find the minimum number of reduce operations required to convert a given string into a palindrome. In a reduce operation, we can change character to a immediate lower value. For example b can be covered to a.
Examples : 
 

Input  :  abcd  
Output :  4
We need to reduce c once
and d three times.

Input  : ccc
Output : 0


Minimum reduce operations to covert a given string into a palindrome : https://www.geeksforgeeks.org/minimum-reduce-operations-covert-given-string-palindrome/