I am aware of the various rates of Big O such as O(n^2) and O(n), and have no problem determining the Big O value of simple nested for loops such as the following.

```
for (int i = 0; i < n; i++)
    for(int j = 0; j < n; j++)
   //Simple Statement

```

The following loop is clearly O(n^2), but how does one go about solving for Big O when the inner nested loop is dependent on the outer loop.
 Example

```
for ( int i = 0; i < n; i++)
    for (int j = n - 1; j >= i; j--)
    //Simple Statement

```

would T(n) simply be n\*(n-1-i) ?

Thanks in advance for the help!