Let's assume an array has three elements:
A=[1,2,3]
What I want to know is that it is possible to add each element of the array to each other so that the time complexity is O (n) ?. The result should be
b=[(1+1),(1+2),(1+3),(2+2),(2+3),(3+3)]
source
to share