```
for(int i = 0; i < n; i++) {
   for(int j = 0; j < i; j++) { 
      O(1);
   }
}

```

here the func is `n * (n+1) / 2` but what if the outerloop condition is `i < log(n)`? I have problems with loops that relates on each other.