Computer Science, asked by rajpuja72033pa3l0c, 7 months ago

What is true about run time complexity of these 2 code snippets?
fun1(int n)
fun2(int n)
{
{
int i=1, s=1;
int i=1, s=1;
While (s <=n)
for (i =1;i*i <=n; i++)
{
{
i++;
cont++;
s=s+i;
}
printf("*');
}
}
}
A) fun10 runs in O(n) while fun20) runs in O(na)
B) Both fun 10 and fun20 run in linear time
C) Both fun 1() and fun20) run in O(sqrt(n))
D) None of these​

Answers

Answered by rranjitsingh851
0

Answer:

first follow me and Mark me as brainliest then I'll answer your question

Similar questions