Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Give the asymptotic running time of each the following functions in notation. Justify your answer. (Show your work.) 1. func1(n) 1 s+0; 2 for i
Give the asymptotic running time of each the following functions in notation. Justify your answer. (Show your work.)
1. func1(n) 1 s+0; 2 for i + 100 to n do for j+ 11 to [i/3 (log7(i))] do |s+s+i j; end 3 6 end 7 return (s); func2(n) 1 s+ 0; 2 for i + [n/3] to [n log, 0(n)] do for j+i to [n (log7(n))] do for k + 6j2 to 6j + [n.7] do s+ s+i- j+ k; 3 end end 8 end 9 return (s); 3. func3(n) 1 s+ 0; 2 for i + [(logs(n))] to [n/2 log9(1n)] do for j +1 to i do for k + j to i? do s+ s+i j + k; end 3 4 end 8 end 9 return (s); 2Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started