Driver code
let k = 2 ; let arr = [ 2 , 4 , 1 , 3 , 1 ] ; let n = arr . length ; document . write ( " " + k + " " + kBitDifferencePairs ( arr , n , k ) + " " ) ; k = 3 ; document . write ( " " + k + " " + kBitDifferencePairs ( arr , n , k ) + " " ) ;