Available question text
Construct a length 2n-1 sequence where 1 appears once and each i∈[2,n] appears twice with exactly i indices between its two occurrences, and return the lexicographically largest valid sequence. The core challenge is a constrained placement/backtracking search (try larger numbers first to maximize lexicographic order) under n≤20.
Related questions
Continue with questions that share topics or the same question type.
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 1718. Construct the Lexicographically Largest Valid Sequence
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source