Efficiently count unordered pairs that add up to a target using a hash map.
Constraints
Example
>>> count_pairs([1, 2, 3, 4], 5) 2 >>> count_pairs([1, 1, 1], 2) 3 >>> count_pairs([], 0) 0
Recent Submissions
No submissions yet — hit Run Tests to try!
Hints