Question: def power ( base , exp ) : if exp = = 0 : return 1 else: return base * power ( base , exp
def powerbase exp:
if exp :
return
else:
return base powerbase exp
def betterPowerbase exp:
if exp :
return
if exp :
return betterPowerbase exp betterPowerbase exp
else:
return betterPowerbase exp betterPowerbase exp
Which of the following is true about the space complexity of betterPower
Question options:
O
Ologn
None of the other selections are correct
On
On
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
