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
|
2450 Discussions
|
Please Login in order to post a comment
Here is my c++ solution, you can whatch the explanation here: https://youtu.be/aDv1iUSgnd8
Solution 1 : O(n^2)
Solution 2 : O(n)
Python - one line answer
Assuming that question statement is wrong because the question is considering i >= j
It says when i > j in the question but you get 8 test cases wrong by excluding pairs where i == j. Make it clearer in the description what you're actually looking for.
good point, what a mess is the description
In C# 100%
Python