N(N-1)/2 is O(N^2), which is not substantially better. Particularly to the soul of a computer scientist, which largely ignores constant factors anyway.
N(N-1)/2 is O(N^2), which is not substantially better. Particularly to the soul of a computer scientist, which largely ignores constant factors anyway.