What is the running time of the following function (specified as a function of the input value)?
void Function(int n){ int i=1; int s=1; while(s<=n){ i++; s=s+i; } }
64.3k questions
77.9k answers
244k comments
80.0k users