Convert to Palindrome
Last updated
Last updated
Time Complexity:
Space Complexity:
The given solution on the website is wrong.
They are returning true after checking if no mismatch is found i.e. the given string is a valid palindrome.
But they are missing the fact that a valid palindrome cannot be converted to a valid palindrome by removing a single character if the palindrome is of even length.