- 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 16 times
Determine the complexity class () of the following pseudocode in the worst case. There could be one or more correct answ
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
Determine the complexity class () of the following pseudocode in the worst case. There could be one or more correct answ
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 #######