Target Sum Pair 1

easy
1. You are given an array(arr) of distinct integers and a target.
2. You have to print all the pairs having their sum equal to the target.

Input Format

An Integer N arr1 arr2.. n integers An integer target

Output Format

Check the sample output and question video.

Constraints

1 <= N <= 10000
-10^9<= arr[i] <= 10^9

Notice

Try First, Check Solution later

1. You should first read the question and watch the question video.
2. Think of a solution approach, then try and submit the question on editor tab.
3. We strongly advise you to watch the solution video for prescribed approach.

Example

Input
12
9 
-48 
100 
43 
84 
74 
86 
34 
-37 
60 
-29 
44
160
Output
60, 100
74, 86
Previous
Sort 012
Next
Pivot In Sorted And Rotated Array

Related Questions