Linear Search

Binary Search

Recursive Binary

Merge sort

Given an array of integers nums and a target number target, find all unique pairs of numbers in the array that sum up to the target.
Input: nums = [2, 4, 3, 5, 7, 8, -1], target = 7
Output: [(2, 5), (3, 4), (-1, 8)]
Constraints:
- The solution should avoid duplicate pairs.
- You should aim for O(n) or O(n log n) time complexity.
🔹 Hint
You can solve it using:
- Hashing (dictionary) → O(n)
- Sorting + two pointers → O(n log n)

