Problem 719 · Hard
Binary search the distance; count pairs within it using a sliding window over the sorted values.
Open the interactive visualisation