Given an array of integers and an integer K, count the number of distinct valid pairs (i, j) such that the absolute difference between nums[i] and nums[j] is equal to K.
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.