Question: 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]](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f4edd62e319_70166f4edd5b9e4b.jpg)
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
Get step-by-step solutions from verified subject matter experts
