Palindrome Index

  • + 1 comment

    For instance if our string is "aabb" then although there is no solution for a palindrome with only one removal, for counter = 0 we find that: 'a' at index 0 != 'b' at index 3 and 'a' at index 0 != 'b' at index 2 therefore we return counter 0 but that solution would be abb, which is not a palindrome