标签: performance big-theta
请用以下代码的Θ表示法给出渐近运行时间,谢谢。
for a = 1 to n do b = 2 while b < a do b = b + b
for a = 1 to n do b = 2 while b < a do b = b * b
我认为第二个答案是Θ(n·log2n)。