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
|
2465 Discussions
|
Please Login in order to post a comment
condition should be i <= j not i < j inshallah, correct ?
O(n) solution in JavaScript
Is there any solution but O(n^2) ?
This is my solution, with JavaScript:
def divisibleSumPairs(n, k, ar): freq = [0] * k count = 0