We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Hey in the question it is asked to print the no. of pairs where a[i] +a[j] is divisble by k such that i is always less than j .Are you following the element order?Because you are just storing the mod0, mod1, mod2 values in an array.But it does not keep track of the order of i and j.Thanks!Correct me if I am wrong
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Divisible Sum Pairs
You are viewing a single comment's thread. Return to all comments →
Hey in the question it is asked to print the no. of pairs where a[i] +a[j] is divisble by k such that i is always less than j .Are you following the element order?Because you are just storing the mod0, mod1, mod2 values in an array.But it does not keep track of the order of i and j.Thanks!Correct me if I am wrong