Kth greatest element in a set
Filed under SourceFuse
The question
Given N numbers, insert them into a set. Repeatedly add the absolute difference of all pairs back into the set until the set stops changing. Find the Kth greatest element.
No write-up yet. Related questions below have one.
Related SourceFuse questions
Collected from public candidate posts and coding forums. Updated Nov 2026.