Question: Time left 2 : 2 7 : 1 0 Question 1 Not yet answered Marked out of 1 . 0 0 Flag question Question text

Time left 2:27:10
Question 1
Not yet answered
Marked out of 1.00
Flag question
Question text
What is the order of complexity of the following code fragment as a function of n?
x = n;
while (x >0){
z =0;
while (z <=6)
z = z +2;
x = x -1;
}
Question 1Select one:
a.
O(n)
b.
O(log n)
c.
O(n log n)
d.
O(n2)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!