Finding the Prime number in sqrt(n) Complexity
The major approach to finding the prime number is running the loop from 2 to n and check whether it divides the number or not. The complexity of that solution is O(n).
In this article, We will be discussing how to find the prime number in O(sqrt(n))c...
jitesh.hashnode.dev2 min read