Indices of a sorted array are linked when their values are close. Answer many "is there a path between these two?" queries.
Indices of a sorted array are linked when their values are close. Answer many "is there a path between these two?" queries.
The discussion opens with the full question.