Search
⌘K

Leetcode 2802. Find The K-th Lucky Number

Generate the k-th positive integer whose decimal representation consists only of digits 4 and 7 (the "lucky" numbers), ordered by value. The challenge is to handle large k efficiently by recognizing the bijection between binary patterns (or lengths and combinations) and lucky-number strings rather than brute-force enumeration.


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.