2006. Count Number of Pairs With Absolute Difference K
Description
**Input:** nums = [1,2,2,1], k = 1
**Output:** 4
**Explanation:** The pairs with an absolute difference of 1 are:
- [**1**,**2**,2,1]
- [**1**,2,**2**,1]
- [1,**2**,2,**1**]
- [1,2,**2**,**1**]**Input:** nums = [1,3], k = 3
**Output:** 0
**Explanation:** There are no pairs with an absolute difference of 3.ac
Previous2005. Subtree Removal Game with Fibonacci TreeNext2007. Find Original Array From Doubled Array
Last updated