Given a string s and an integer k, you may delete any characters from s. After deletions you must be able to partition the remaining characters into k groups (multisets) each of which can be rearranged into the same palindrome string. In other words, you want k identical multisets of characters such that each multiset can be permuted to form a palindrome. Return the minimum number of deletions required. Notes and constraints: - You may delete any characters anywhere in s. - Each of the k groups must have exactly the same character counts (same multiset). - Each group's characters must be rearrangeable into a palindrome (i.e., the multiset must allow a palindromic permutation). - 1 <= k <= len(s) <= 10^5. s consists of lowercase English letters. Return the minimum number of deletions needed so the above is achievable.
('aaabbbbcc', 3)2