Time complexity of this function (Similar answers yet one is wrong)

前端 未结 0 429
走了就别回头了
走了就别回头了 2021-01-13 00:37
def f(n):
   i = 2
   while i < n : 
       i *= i

My solution : So what I did was I looked at the sum of the i *= i and I found out

相关标签:
回答
  • 消灭零回复
提交回复
热议问题