Consider the following C function:
int fun(int n) {
int i, j;
for (i = 1; i <= n; i++) {
for (j = 1; j < n; j += i) {
printf("%d %d", i, j);
}
}
}
The time complexity of fun in terms of \(\Theta\) notation is
- A\(\theta (n\sqrt{n})\)
- B\(\theta (n^{2})\)
- C\(\theta (n logn)\)
- D\(\theta (n^{2} logn)\)