CodingEasy
Count pairs whose difference equals K
Filed under CarWale
The question
Given an array and integer K, count the pairs of numbers whose difference is K (A=[3,1,2], K=1 gives 2).
No write-up yet. Related questions below have one.
Related CarWale questions
Collected from public candidate posts and coding forums. Updated Nov 2026.