You are given a string s consisting of the characters 'a', 'b', and 'c', and an integer k.
In each minute, you can choose to take either the leftmost character or the rightmost character of s.
Return the minimum number of minutes needed to take at least k of each character 'a', 'b', and 'c', or return k of each character.
Constraints:
s.length
s consists of only the letters 'a', 'b', and 'c'.
k s.length
You are given a string s consisting of the characters 'a', 'b', and 'c', and an integer k.
In each minute, you can choose to take either the leftmost character or the rightmost character of s.
Return the minimum number of minutes needed to take at least k of each character 'a', 'b', and 'c', or return k of each character.
Constraints:
s.length
s consists of only the letters 'a', 'b', and 'c'.
k s.length