Palindrome with minimum sum | GFG | POTD | 11th May 2023 | Strings | Java | C++ | Problem Of The Day

Опубликовано: 08 Июнь 2026
на канале: Prativa TECH
266
4

The video solves Problem Of The Day question " Palindrome with minimum sum " asked on GeeksForGeeks on 11th May 2023 .

The code aims to find the palindromic string with the minimum ASCII sum of differences of adjacent characters. It iterates through the input string from both ends, replacing '?' characters with suitable letters to make it a palindrome. If it's not possible to create a palindrome, it returns -1. Finally, it calculates the sum of differences between adjacent characters and returns it as the result.

GFG POTD 11th May 2023 :
https://practice.geeksforgeeks.org/pr...

Java | C++ solution Code Link :
https://docs.google.com/document/d/1M...

Java Interview Series :
   • Core Java Interview Questions  

GFG POTD series :    • Problem Of The Day | 31st Jan 2023 | Geeks...  

Java -17 series :    • Java 17 - Introduction