Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Filter
Profile
Wall
Recent activity
All questions
All answers
Exams Taken
All Blogs
Answers by o
0
votes
1
GATE CSE 2007 | Question: 51
Consider the following C program 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 number of times the $for$ loop is executed by the program on input $n$. Which of ... $T(n) = O(n) \: \text{ and } T(n) = \Omega(\sqrt{n})$ None of the above
Consider the following C program 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)$ deno...
14.7k
views
answered
Nov 23, 2021
Algorithms
gatecse-2007
algorithms
time-complexity
normal
+
–
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register