Kth smallest absolute difference between any two elements
Filed under Cimpress
The question
Given an array A of size N and an integer K, a sequence S is formed by taking the absolute difference between all possible pairs of elements. Find the kth smallest element in S.
No write-up yet. Related questions below have one.
Related Cimpress questions
Collected from public candidate posts and coding forums. Updated Nov 2026.