In this video we will see how to find all pairs from two unsorted arrays of distinct elements, whose sum is equal to X.
Examples:
Input : arr1[] = {-1, -2, 4, -6, 5, 7}
arr2[] = {6, 3, 4, 0}
x = 8
Output : 4 4
5 3
Check out the video to see how we implement this!!
Practice Problem: https://practice.geeksforgeeks.org/problems/find-all-pairs-whose-sum-is-x5808/1
Article: https://www.geeksforgeeks.org/given-two-unsorted-arrays-find-pairs-whose-sum-x/
SDE Sheet: https://www.geeksforgeeks.org/sde-sheet-a-complete-guide-for-sde-preparation/