LeetCode

Shortest Distance to a Character

Click here for an explanation.