Count of subarrays of size K having at least one pair with absolute difference divisible by K | Function to return the required number of subarrays ; Return number of possible subarrays of length K ; Driver Code
function findSubarrays ( arr , N , K ) { return N - K + 1 ; } let arr = [ 1 , 5 , 3 , 2 , 17 , 18 ] ; let K = 4 ; let N = arr . length ; document . write ( findSubarrays ( arr , N , K ) ) ;