I know, that the following is: **O(n^2)**,

`int count = 0; for(int i = 0; i<array.length(); i++) { for(int j = i+1; j<array.length(); j++) { if(array[i] == array[j]) { count = count + 1; } } } `

But, should something like `count = count + 1;`

be taken into account? For predicting or making up a complex time equation, or using sum notation,

`n + n-1 + n-2 + n-3 + (…) + 1 `