← HashedIn questions

Find all pairs in array with given sum

Filed under HashedIn

The question

Write a code that returns all pairs in an array with a sum equal to x, optimized to O(n) time complexity.

No write-up yet. Related questions below have one.

Related HashedIn questions

Collected from public candidate posts and coding forums. Updated Nov 2026.