Hackerrank - pairs
https://www.hackerrank.com/challenges/pairs/problem Pairs | HackerRank Given N numbers, count the total pairs of numbers that have a difference of K. www.hackerrank.com function pairs(k,arr){ arr.sort((a,b)=>a-b); let start = 0; let end = 0; let cnt = 0; while(end