Test on time complexity

Time: 00:00:00
0
Attempted
8
Not Attempted
0
Marked For Review
0
Attempted & Reviewed

Question 1 of 8

What is time complexity of fun()?

int fun(int n)
{
  int count = 0;
  for (int i = 0; i < n; i++)
     for (int j = i; j > 0; j--)
        count = count + 1;
  return count;
}
Select Your Answer:

All Questions

Attempted
Not Attempted
Marked for Review
Attempted & Reviewed
Current