Minimum Absolute Distance Between Mirror Pairs
Scan left to right and remember the latest index for each reversed value, so each mirror match gives its closest gap.
Scan left to right and remember the latest index for each reversed value, so each mirror match gives its closest gap.