Shortest Distance to Target String in a Circular Array
Measure each matching word's distance from the start in both circular directions and keep the smaller one.
Measure each matching word's distance from the start in both circular directions and keep the smaller one.