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.
Divisible Sum Pairs
Divisible Sum Pairs
Sort by
recency
|
2370 Discussions
|
Please Login in order to post a comment
Javascript:
python solution TIP : Ignore the ( i < j ) i don't know why they add that condition . def divisibleSumPairs(n, k, ar):
Here is my c++ solution, you can whatch the explanation here: https://youtu.be/aDv1iUSgnd8
Solution 1 : O(n^2)
Solution 2 : O(n)
in my code it works w mod of a[i]. i think this should work on 10^5 numbers too. they are w formulas btw fori is for(ll i=0;i
`