2 Sum - Target Sum Unique Pairs
easy
1. Given an Array of size 'n' have may or may not be repeated elements. 2. A 'target' is provided. 3. Return Pair of target sum in which all pairs are unique, for example : [1, 2], [2, 1] are consider as same pair. 4. If array have repeated element then return only unique pair, for example : if array is arr = [2, 2, 4, 4], and target = 6 then res have only one pair, i.e. [2, 4]
Constraints
1. 2 <= n < 10000 2. -10^9 < arr[i] < 10^9 3. pair[0] + pair[1] < 10^9
Format
Input
Input is managed for you.
Output
Output is managed for you.
Example
Sample Input
6
10 10 30 40 50 20
60
Sample Output
10 50
20 40