332 views

1 Answer

3 votes
3 votes
You can just put the value and verify the answer. I think the answer should be option B because for the question is asking for the largest input we can give so that the problem could be solved in $1sec$. Therefore, for algorithm A if we give the input of size $2^{10^{6}}$, then it is taking $log(2^{10^{6}})=10^{6}\mu s=1sec$. Similarly, for algorithm B, if we give the input of size $10^{^{12}}$, then it is taking $\sqrt{10^{12}}=10^{6}\mu s=1sec$.

Related questions

0 votes
0 votes
1 answer
1
rsansiya111 asked Dec 20, 2021
516 views
Consider the following C program:#include <stdio.h>int r( ){static int num = 7;return num ;}int main ( ) {for (r( ) ;r ( ) ;r ( ) )printf(“ % d”, r( ) );return 0;}Whi...
0 votes
0 votes
1 answer
2
rsansiya111 asked Dec 19, 2021
283 views
0 votes
0 votes
1 answer
3
rsansiya111 asked Dec 17, 2021
313 views
0 votes
0 votes
1 answer
4
rsansiya111 asked Dec 16, 2021
381 views