Leetcode 1492. The kth Factor of n
Return the k-th smallest positive divisor of n (or -1 if n has fewer than k divisors). The core challenge is enumerating divisors in ascending order efficiently—use the factor-pair symmetry around sqrt(n) to do better than a naive O(n) scan.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
0
Hello Interview Premium
Your account is free and you can post anonymously if you choose.