Code for prime factorization

sir can i get code for this algorihtm

@tejasddongare

sir i have done the code without using vector
i just want to know is this code passing all test cases?

@tejasddongare its working fine