Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 532. K-diff Pairs in an Array
Count the number of unique unordered pairs (x, y) from the array whose absolute difference is k. Handle k>0 by checking distinct values x for which x+k exists, while k=0 requires counting values that appear at least twice.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.