Find the k-th smallest integer from 1 to n in lexicographical order
Company: ByteDance
Role: Software Engineer
Category: Coding & Algorithms
Difficulty: hard
Interview Round: Other
Overview: Given n and k, find the k-th integer in the range 1 to n when the numbers are ordered as decimal strings in dictionary order. Since n can be as large as one billion, it tests reasoning about the structure of that order and counting numbers without listing them.