3 ms·Adding up 1+2+...+n equals to n(n-1)/2, which when converted to an order becomes O(n^2).by ishitatsuyuki 8y agoAdding up 1+2+...+n equals to n(n-1)/2, which when converted to an order becomes O(n^2).