1. You are given an array(arr) of distinct integers, which is sorted and rotated around an unknown point. 2. You are also given 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
9 15 16 19 21 23 24 1 2 12 25
Output
1, 24 2, 23