Determine the complexity class() of the following pseudocode in the average case. There could be one or more correct ans
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
Determine the complexity class() of the following pseudocode in the average case. There could be one or more correct ans
Determine the complexity class() of the following pseudocode in the average case. There could be one or more correct answers. All variables are integers. Array A is assumed to contain n values. We assume that random(a,b) returns an integer between a and b in O(1) time. ############################ for count=1 to n² for i = 0 to n-1 A = random(1, 10) MergeSort(A) (n²) □ (n³) □ (n² (log(n))²) □ 0(n² log(n)) □ (n³ log(n)) ## Ⓒ(n³ (log(n))²) All are incorrect ####
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!