What is the time complexity of the algorithm provided?

后端 未结 0 382
耶瑟儿~
耶瑟儿~ 2020-12-19 00:06

Consider the following c++ code of a function:

A(int n)
{
​ i = 1;
 S = 1;
 while (S<=n)
​ {
 ​ i++;
 ​ S = S + i;
 ​ printf("Edward");
​ }
​ }
<         


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