Array Sum Of All Elements? : I have an Array A with size N. I want to make a new array of size N*N such that my new Array B will be as follow with Time Complexity less than O(n^2):
For A[0..N-1] ,
B= {A[0]+A[1], A[0]+A[2], ……., A[1]+A[0], A[1]+A[2], ……., A[N-1]+A[0], A[N-1]+A[1],..., A[N-1]+A[N-1]}.
Example:
A={1,2}
The sequence B is { A1+A1, A1+A2, A2+A1, A2+A2 } = {2,3,3,4}. 

