Appearance
下列函数的时间复杂度是( )。
int func(int n) { int i = 0, sum = 0; while(sum < n) sum += ++i; return i; }
提示:可在可视化区直接操作播放、步进、修改参数