Answered step by step
Verified Expert Solution
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
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
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