A company sells dumbbells in pairs hackerrank solution. A pair can only be sold if their weights are sufficiently close: no greater than 1 unit difference. * They receive a shipment of dumbbells weighing anywhere from 1 unit up to a certain maximum. Solutions of problems from HackerRank. For example, if there are 2 dumbbells of weight 1, 4 of weight 2, 3 of weight 3 and 1 of weight 4, they can be paired as [1,1], [2,2], [2,2], [3,3], [3,4] for a total of 5 pairs. A pair can only be sold if their weights are sufficiently close: no greater than 1 unit difference. Given N numbers, count the total pairs of numbers that have a difference of K. Function Description Complete the pairs function below. A collection of solutions to competitive programming exercises on HackerRank. They receive a shipment of dumbbells weighing anywhere from 1 unit up to a certain maximum. Question: A company sells dumbbells in pairs. tfam uxaj ta jnsn4 dz8 uwwyy 6z3ckif gewk y81axhg yboo