Question
Echo Pair Distance
You are given an integer array and a target. Among all pairs
Input
First line: KaTeX can only parse string typed expression.
Second line: KaTeX can only parse string typed expression integers.
Output
Print the minimum valid index distance, or KaTeX can only parse string typed expression.
Example
Input:
Values 4 and 6 occur at adjacent indices 2 and 3.
6 10
1 9 4 6 3 7Output:1Explanation:Values 4 and 6 occur at adjacent indices 2 and 3.