Back to questions
Given a target number, write a function to return the largest prime factor of that target number.
For example, for the number 42, the prime factors are 2, 3, and 7, so we'd return 7 because that's the largest prime factor.
For the number 25, it's prime factors are 5 and 5, so we'd return 5.
The time complexity of this code is and the auxiliary space used is constant .