Character to be removed to become a palindrome
Given a string, We have to find out by removing which character, it becomes a palindrome.For example consider the string “racercar”, the character ‘r’ at index 4 should be removed to become a palindrome.The approach here is simple. Start from both ends of the string and compare both characters. If they are equal, we increment…