I need to find an "efficient" algorithm for a problem and the best I could figure out is something that for each element it looks at all the other elements (n^2), but as it goes through it has to look at 1 less elements. So for 5 elements it does 5 loops+4+3+2+1. Is this still considered n^2 or is it better?