Comment Comment by aboveandbeyond It's actually O(1). It's (N * (N+1))/2 parent aboveandbeyond 12 years ago