shekinahdavis1389 shekinahdavis1389
  • 06-02-2024
  • Mathematics
contestada

What is the time complexity of the below algorithm: def myfunction(n): if n < 2: out = 1 else: out = myfunction(n-1) myfunction(n-2) return out
a) O(2^n)
b) O(n)
c) O(n²)
d) O(log n)

Respuesta :

Otras preguntas

How much did it cost summer to to buy 2.6 pounds of granola at the old price
crusoe inner struggle with the consequences of disobedience is best represented by what type of conflict A. Character versus self B. Character versus nature C
Write the slope intercept form of the equation through (-4,-2), perpendicular to y=-9/4x-4
What is not one of the responsibilities of the federal reserve?
365g MnSiO3 = ___ mol
How many scripts can be embedded in an xhtml document?
what enzyme is coded for in the chromosome of bacteria? A: glucose b: galactose C: lactose D: beta-galactosidase
1. The degree of the polynomial is - even or odd 2. The Leading Coefficient is - negative or positive 3. The Polynomial is - three or four zeros
How has Gregor's father changed from the beginning of the story? A. The father still likes to have fun and be silly with Gregor. B. The father is gentler and mo
The equation y - 3 = -2(x + 5) is written in point-slope form. What is the y-intercept of the line? A. –13 B. –7 C. 2 D. 8