Question: 120. What is the time complexity of this code fragment? for (i from 0 until n bv 2) println(i); while (j ? n) println(j); (A)












120. What is the time complexity of this code fragment? for (i from 0 until n bv 2) println(i); while (j ? n) println(j); (A) ?(log2 n) (B) ?(n log n) (C) ?(m) (E) ?(n2) (F) ?(n) 121. What is the space complexity of this code fragment? for (i from 0 until n bv 1) println(i); (A) ?(n2) (B) ?( n) (D) ?(n log n) (E) ?(n) (F) ?(log n)
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
