Question 1 50 Pts Select Multiple Dropdowns Examine Following Pseudocode Line Numbered Lef Q43841612
Question 1 50 pts Select from multiple dropdowns. Examine the following pseudocode. Each line is numbered (leftmost number). The objective of this exercise is to determine the time complexity of this algorithm that takes as input an nxn matrix M and initialize it. We assume that the first line starts at i=1 and the first column starts atj=1. First, this algorithm has a bug on line # 3 Answer all the next questions assuming that the bug is corrected. Line # 2 performs [Select] comparisons and [Select ] additions during the full execution of this algorithm. The assignment statement “M.. = 0.0” will be executed [ Select] times. In total, the inner loop will perform [Select] comparisons. This total number of comparisons of this algorithm grows as (Select ] .This total number of comparisons, additions and assignment (M…=0.0) of this algorithm grows as (Select] InitializeMatrix(M) 1: //Initialize Matrix to 0.0 for each element 2: for j = 1 ton 3: for i = 1 to n-1 4: M[i][j] = 0.0 5: return Show transcribed image text Question 1 50 pts Select from multiple dropdowns. Examine the following pseudocode. Each line is numbered (leftmost number). The objective of this exercise is to determine the time complexity of this algorithm that takes as input an nxn matrix M and initialize it. We assume that the first line starts at i=1 and the first column starts atj=1. First, this algorithm has a bug on line # 3 Answer all the next questions assuming that the bug is corrected. Line # 2 performs [Select] comparisons and [Select ] additions during the full execution of this algorithm. The assignment statement “M.. = 0.0” will be executed [ Select] times. In total, the inner loop will perform [Select] comparisons. This total number of comparisons of this algorithm grows as (Select ] .This total number of comparisons, additions and assignment (M…=0.0) of this algorithm grows as (Select] InitializeMatrix(M) 1: //Initialize Matrix to 0.0 for each element 2: for j = 1 ton 3: for i = 1 to n-1 4: M[i][j] = 0.0 5: return
Expert Answer
Answer to Question 1 50 pts Select from multiple dropdowns. Examine the following pseudocode. Each line is numbered (leftmost numb…
OR