Search
⌘K

Leetcode 313. Super Ugly Number

Return the nth positive integer whose prime factors are all drawn from the given list primes (the generalized "super ugly numbers"). With n up to 1e5 and primes length up to 100, you must generate the sequence efficiently rather than testing each integer.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.