Given a string s and a character c that occurs in s, return an array of integers answer where answer.length == s.length and answer[i] is the minimum distance from index i to any index j such that s[j] == c.
The distance between two indices i and j is defined as
Constraints:
s.length
s[i] and c are lowercase English letters.
It is guaranteed that c occurs at least once in s.
Given a string s and a character c that occurs in s, return an array of integers answer where answer.length == s.length and answer[i] is the minimum distance from index i to any index j such that s[j] == c.
The distance between two indices i and j is defined as
Constraints:
s.length
s[i] and c are lowercase English letters.
It is guaranteed that c occurs at least once in s.