You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
count[num%k] +=1 #will keep count of the following values, i.e 0== multiple of K, 1== multiple for k + 1, 2 == multiple of k + 2,3 == multiple of k + 3 ,4 multiple of k + 4.
i,j =1,k-1
pairs = 0
while i<j :
if count[i]!=count[j]:
return False
pairs += count[i] #count number of pairs!
i+=1
j-=1
if pairs>0 and i==j: #I didn't get this condition yet!