https://ide.codingblocks.com/s/189088
How can I decrease the time complexity.If I use seives then its gonna increase the space complexity quite allot since the number can be INT_MAX
https://ide.codingblocks.com/s/189088
How can I decrease the time complexity.If I use seives then its gonna increase the space complexity quite allot since the number can be INT_MAX
Hey @manit123
You need to use sieve. But not upto INT_MAX. We only need to consider prime numbers upto INT_MAX^(0.5) because factors can be found uptil root of value.
If your doubt is resolved please mark it as closed.
In my program Iām kind of using sieves itself in order to find the prime factors ,Iām not using brute force .
Found My error . You can mark this doubt resolved.