Available question text
Generate the integers from 1 to n in lexicographical (dictionary) order under O(n) time and O(1) extra space; the core challenge is to traverse the implicit 10-ary trie of numeric prefixes (iteratively go deeper by multiplying by 10 and backtrack/increment when necessary).
Related questions
Continue with questions that share topics or the same question type.
- Add Two Numbers
Coding · Linked List · Math · Recursion
- Add Two Numbers II
Coding · Linked List · Math · Stack
- Adding Two Negabinary Numbers
Coding
- Average Value of Even Numbers That Are Divisible by Three
Coding
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 386. Lexicographical Numbers
Interview date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source