function to find longest sub - array whose elements gives same remainder when divided with K
function LongestSubarray ( arr , n , k ) { let count = 1 ; let max_length = 1 ; let prev_mod = arr [ 0 ] % k ;