Finding Prime Factors of a number in $\log(n)$
Only Strategy I am aware of for finding factors efficiently is sieve of eratosthenes but from sieve I first have to pre-compute the prime numbers less than than $\sqrt{n}$. I want to skip this computation and implement an $O(\log(n))$ solution. Is there any such solution?
$\endgroup$ 11 Answer
$\begingroup$No. As determining whether a number $n$ is prime is in $O(n)$, finding a prime factor is obviously also in $O(n)$.
$\endgroup$ 2