I am creating two list having sum of pairs of two distinct array in O(n^2) tc. And thereafter I use HashMap for solving it and in worst case it will take O(n^2) tc. Where in comments people say O(n^2 * log n) has passed.