3 ms·I'd assumed the OP meant O(n^2), and n(n-1)/2 = O(n^2)by jjgreen 3y agoI'd assumed the OP meant O(n^2), and n(n-1)/2 = O(n^2)