Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

3. Consider the following functions and answer the questions. [6 marks] def functionA(n): m=n*n for i in range(m): print(hello world) def function(n): if n>1000: for

image text in transcribed

3. Consider the following functions and answer the questions. [6 marks] def functionA(n): m=n*n for i in range(m): print("hello world") def function(n): if n>1000: for j in range(n): else: functionA(nn) a) Give the tight asymptotic time complexity of functionA using Big-O notation. [2 marks] b) Give the tight asymptotic time complexity of functionB using Big-O notation. [3 marks] c) If n=5, how many "hello word" are printed in functionB? [3 marks]

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

Linked Data A Geographic Perspective

Authors: Glen Hart, Catherine Dolbear

1st Edition

1000218910, 9781000218916

More Books

Students also viewed these Databases questions

Question

How many Tables Will Base HCMSs typically have? Why?

Answered: 1 week ago

Question

What is the process of normalization?

Answered: 1 week ago