python, traverse from longest
\n# I am assuming they mean contiguous substrings\n\nfrom collections import Counter\n\ndef palindromable(s):\n    # to be palindromable there needs to be an ev
```\n# I am assuming they mean contiguous substrings\n\nfrom collections import Counter\n\ndef palindromable(s):\n    # to be palindromable there needs to be an even number of all chars except one odd is acceptable\n    counts = Counter(s)\n    num_odds = 0\n    for char, ct in counts.items():\n        if ct % 2 != 0:\n            num_odds += 1\n            if num_odds > 1:\n                return False\n    return True\n\ndef findlength(s: str) -> int:\n\t# traverse from longest contiguous substrings\n\tnum_chars = len(s)\n\tfor num_dropped in range(num_chars):\n\t\tfor left_idx in range(num_dropped + 1):\n\t\t\tright_idx = num_chars - (num_dropped - left_idx)\n\t\t\tsub_s = s[left_idx: right_idx]\n\t\t\tif palindromable(sub_s):\n\t\t\t\toutput = num_chars - num_dropped\n\t\t\t\treturn output\n\t```
[]