Prime factorization using sieve

please explain each step of factorized method without vector bcz i don’t no about vectors…

hello @vishal_sangal_123
see u can think vector as an array, where to push element in the end we use push back.

we are iterating from i = 2 to sqrt(n)

if n%i==0 then it means i is the factor of n.
so we are dividing n with i till n%i==0 and keeping the count of divisions.

and at the end we are pushing the factor i and its count inside vector.
and in the end we are printing the same

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.