Answered step by step
Verified Expert Solution
Link Copied!

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.)

image text in transcribed

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); 2

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Jeff Hoffer, Ramesh Venkataraman, Heikki Topi

12th edition

133544613, 978-0133544619

More Books

Students also viewed these Databases questions