Shortest Distance to a Character

From LeetCode. Distance to target character in string. Solve the geometry problem "Shortest Distance to a Character".

Examples
Input: [1,2,3]
Output: 0
Hints

Shortest Distance to a Character

**From LeetCode.** Distance to target character in string. Solve the geometry problem "Shortest Distance to a Character".