MCQ Answer

In a prime-checking algorithm, the loop typically runs from:

In a prime-checking algorithm, the loop typically runs from:

Prime-checking algorithm की सामान्य time complexity क्या है?
Topic : Algorithm and Flowcharts to solve problems

A. 1 to n

B. 2 to n-1

C. 1 to √n

D. 2 to √n




Correct Answer is :

D. 2 to √n



Explanation
To test primality efficiently, divisors only need to be checked up to √n.

Prime number check करने के लिए √n तक divisibility check करना पर्याप्त होता है।
Online Exam Quiz for One day Exam Online Typing Test CCC Online Test 2026 Best Computer Training Institute in Prayagraj (Allahabad) Best Java Training Institute in Prayagraj (Allahabad) Best Python Training Institute in Prayagraj (Allahabad) O Level Online Test in Hindi Best Website and Software Company in Allahabad