Say you are given
int a[ ] = {1,2,3,4}; int b[ ] = {4,3,2,1}; int S = 5;
Now the task is to find all pairs of two number which adds up to S (One number from a and other number from b).
While reading possible time complexity i found that time complexity O(log log n) exist for some algos,
Can any one explain an example which shows the calculation of the time complexity with O(log log n)