Driver code
if __name__ == ' _ _ main _ _ ' : NEW_LINE INDENT k = 2 NEW_LINE arr = [ 2 , 4 , 1 , 3 , 1 ] NEW_LINE n = len ( arr ) NEW_LINE print ( " Total ▁ pairs ▁ for ▁ k ▁ = " , k , " are " , countPairsWithKDiff ( arr , n , k ) ) NEW_LINE DEDENT