K-Different Pairs - Company-specific OAs / Twitter OA

Given an array of integers nums and an integer k, return the number of unique k-diff pairs in the array. A k-diff pair is an integer pair (nums[i], nums[j]), where both of the following are true:


This is a companion discussion topic for the original entry at https://algo.monster/problems/twitter_oa_k_difference/

Input: [1, 3, 6, 0], k=3
Output should be 2 ([3, 6], and [3, 0]), but the given solution says that the output should be 0.

Tests seem to be fine.

However, the problem should state explicitly that if you found a pair (x, y), and then you found (y, x), then you should not count the last one since it is considered to be the same pair as the previous one.