> This naive algorithm runs in O(n2) time in Big O terms.<p>Is this true? The naive algorithm's outer loop (i) counts n - 1, while the inner loop (j) begins at i + 1 (so counts progressively less than n - 1).<p>Not a CS major, is this roughly equivalent (for large values of n) to O(n2) or is it, as it appears, something less?