[LeetCode] Shortest Distance to a Character 到字符的最短距离
GivenastringSandacharacterC,returnanarrayofintegersrepresentingtheshortestdistancefromthecharacterCinthestring.Example1:Input:S="loveleetcode",C='e'Output:[3,2,1,0,1,0,0,1,2,2,1,0]Note:Sstringlengthis