Consider the following procedure which takes a positive integer n as input; it invokes two subroutines F and 6. Procedure P(n) { fori := 1 to n { F(n) if(i < log? n){ G(n) } } } Assume that F(n) takes G(n log n) time and G(n) takes G(ng) time. Let T(n) be the running time of Procedure P. Then, T(n) would be: (Hint: Count the number of times F(n) is called and number of times G(n) is called] Select one: U a. (3(n2 10g(n)) O b. G(n log2 (n)) O c. G(n2 log2 (n)) Q d. 8(n3)

Solved
Show answers

Ask an AI advisor a question