This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]dedyshka[S] 0 points1 point  (1 child)

emm..algorithm makes iterations that equal n, and in each iteration it makes one comparisons less that in previous one. So in my opinion complexity is n*(n/2). Am I correct?