You are viewing a single comment's thread. Return to all comments →
This is O(n+k); sometimes k could be much bigger than n. If you actually want O(n), use a hashmap.
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 →
This is O(n+k); sometimes k could be much bigger than n. If you actually want O(n), use a hashmap.