info@avatto.com
+91-9920808017
0. Consider the following C code segment: int IsPrime(n) { int i, n; for(i = 2; i < = sqrt(n); i ++) { if(n% i = = 0) printf ("Not Prime\n"); return 0; } return 1; } Let T(n) denote the number of times the for loop is executed by the program on input n. Which of the following is TRUE?
T(n) = O(√n) and T(n) = Ω(√n)
T(n) = O(√n) and T(n) = Ω(1)
T(n) = O(n) and T(n) = Ω(√n)
None of these
You must be logged in to post a comment.
Login with Facebook
Login with Google
Forgot your password?
Lost your password? Please enter your email address. You will receive mail with link to set new password.
Back to login
You must be logged in to post a comment.