You are given an int array and a integer n.you have to display all the index pairs in array whc will have a sum of n. write a code for that??
this question was asked in 2nd round of microsoft interview in our campus today.i wrote a code with O(n square) complexity.but they expected O(n).wat will be the algo for O(n)???? i just need to know about the soln they hv kicked me out in this question