Page 1 of 1

Determine the complexity class () of the following pseudocode in the worst case. There could be one or more correct answ

Posted: Mon Jun 06, 2022 6:45 pm
by answerhappygod
Determine The Complexity Class Of The Following Pseudocode In The Worst Case There Could Be One Or More Correct Answ 1
Determine The Complexity Class Of The Following Pseudocode In The Worst Case There Could Be One Or More Correct Answ 1 (61.26 KiB) Viewed 17 times
Determine the complexity class () of the following pseudocode in the worst case. There could be one or more correct answers. All variables are integers. Suppose that "random(a,b)" generates a random integer between a and b in O(1) time. i=1 s = 0 while i <= 2n for j = 1 to n s += random(1, 10) i = 2*i print(s) ###### □ (n²) ☐ 0 (2¹) □ (n2") (n log(n)) (n² log(n)) (2¹ log(n)) All are incorrect #######