Question: S1 #9 ) Give, using big oh notation, the worst case running times of the following procedures as a function of n greaterthanorequalto 0. procedure
S1 #9 )

Give, using "big oh" notation, the worst case running times of the following procedures as a function of n greaterthanorequalto 0. procedure matzero for i = 1 to n do for j = 1 to n do begin C[i, j] leftarrow 0 for k = 1 to n do C[i, j] leftarrow C[i, j] + A[I, k]*B[k, j] endfor endfor endfor procedure unknown for i = 1 to n - 1 do for j = i + 1 to n do for k = 1 to j do {statements requiring Q(1) time} endfor endfor endfor procedure quiteodd for i = 1 to n do if odd(i) then for j = 1 to n do x leftarrow x + 1 endfor for j = 1 to i do y leftarrow y+1 endfor endif endfor function recursion (n) if n
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
