Finding the pair having difference X, Algorithm works better than O(n).